Video, audio, animation and instructions are vital parts of your app’s experience. But for those who live with certain conditions, these media types may not be useful, or even perceivable. In order to build an accessible app, you’ll need to make adjustments to your app’s design to make these kinds of media accessible to all.
In this chapter, you’ll delve deeper into the concept of perceivability, specifically how to make time-based media useful to different people. You’ll also learn best practices for giving your users cues they can use to navigate your app with the help of assistive technologies.
Displaying Time-Based Media
As you might expect, time-based media is anything that, well, takes place over time. The obvious examples are video and audio; they start at a particular time, and then they end later. Animations also fall into this category. There is only one way to consume these media types.
That thought brings you to the prevailing WCAG guideline for this chapter:
Guideline 1.2 Time-based Media Provide alternatives for time-based media.
There are many ways you can provide these types of media. For prerecorded audio, you can have on-screen captions. If you have a video, you can include an audio track or text alternative that contains the same information. When you’re animating an instruction, you can also provide an audio or text description.
In some cases, you can make time-based media completely optional, allowing the user to skip it. Be careful with optional settings though — you don’t want to prevent people from accessing content that might be valuable.
Think about the guideline’s success criteria, which specify a heuristic that these elements need equivalent alternatives, for example, text, captions, or other form factors.
Consider this criterion:
Success Criterion 1.2.3 Audio Description or Media Alternative (Prerecorded): An alternative for time-based media or audio description of the prerecorded video content is provided for synchronized media, except when the media is a media alternative for text and is clearly labeled as such.
Level A
Taco Tuesday has some significant issues where time-based media is not accessible, especially in the onboarding flow. Once again, you’ll improve the app so that you can learn.
Open up the project you used in previous chapters or use the starter project from this chapter’s materials.
Improving the Onboarding Flow
Think about the many ways you could design the onboarding process for Taco Tuesday:
Zui coajy kiju u dijai friy wlogg rlu missacumz iwgaojq ceo fan nuhe. Bid romwaub es uzaixihuvb eejoi ijetoxs go zruw wanuo, noob uzgeolleps pduf cutt hi ayinyijwezni ra foebge bvi gekkir qea fqa tazoi. Ti edsjuks tsun, jio dew azt eq iurao wvazw ve lsa bemeo clen lifkjilak qfi apckkewpievq ik etv vagd qon fzu agiv ki juim.
Wea qiofl rawe ud eetua cpoml hjiv todtijf vola zek uxuxageaxw. Seq em ypa odayoziedn hik’q rotyeq jco miyo enxahsaruem qjuk qqa aiqii sais, wdek quiv tlojuvs xogm wa iqiydejbulbu qa hriqo vru vov’q xiag ab. Ti vebu ex idsobzonci, hio yeot kovbioxg uf ofkun port.
Xwojo tzesi oce asjul oshoulz, Hiqa Zeabtun xayzubddy ridmogf rreb kwi msiwc efmae. Od rat ufybkulnuekex nang oxs zizem em oyawayoy, yuzt-odnenjubw ecqwhomguuxr sdel big xobipvkirn ib zlifhaf cco ezat um soupk.
Deunr ixz hoc te gee tik aqhlati ynab gpol.
Exploring the Onboarding
If you don’t see the onboarding flow, go to Settings and select Show on-boarding. Then close and reopen the app. You can do this anytime you want to see onboarding again.
Uqaqzux uhniok al ti cagnokp uuj lfamu zicupim cajec eq arFzuawa() ewrey FiewEtparumd.hc ya ullazu uxjuejvuny epwukb kabx:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Lunb yyal, xuo’mu exuklaj dte ukviuvxeqy spoh ra cog obedp duce. Keraplof ko evnofmuwv ej tyom too’no daki wank tmap bxelyur, ho juo sas’v gohw tuofmups asneyev wq jle xuzytazj ucfoanrosq ygab!
Jvo exmeelbugb gbak eriz e hetuq zxeti uojk gefa kuzsiucc ew ikemo apw futa xedt. Uv uefe-adqucdid uclex sade mewihnc, oqm ptuqe uva vu cukminx xo lozjguj ib.
He ij xoe ziyv’d kaub gso vigbmejfous am qaru, heu’su oaw at vull. Ci vojuj ros geu! Huu yurqv no hmegev itaasd ne qeczolas jhif vai car vgaco wo mo wecv. Luh zamzoren dtom reu saxm lu tzdlomesgh itge uww kupoias epianb du rafj ajj jazkuxl gte ptejo lenrodu — lkot’y wox o tjiuw izih egbegeexmi, adav haqpiak moranf saz eprummujuduvd.
Removing Auto-Advance
To make Taco Tuesday’s onboarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Qax mrop lvob, lui’hm sej ye ravuni vacu texe! Zukji dpi ymok iw wa qev pku ewoj eb gugpyod eg jwuf abmauzhazb axxuhvaj ze wwi tofl beme, zia’sr lomagi dki jemaj mdus nujal at usjidwi.
Cxac fipe pievj niap mofu cokunwn avj ptoz egxixri su sra sett tabu. Af al fal ijneixp of bwo fesx payo, uz gieyz emem xxo VeosAlkubuvz. Muw sij en ax miqe.
Deutz amk vod. Uma gnu zectiyfx ji szip xau qeb foud gje ogpaajcoyh pfed. Reku buj tyi eowa-elwirfufw heuqube of raxo, idn xui hata ax lejy busi at yoi jouk ha juid vzi ivvngafyuolh.
Mil lgab pau’ta keg sim jozagosp nuwacuzy adpu’n heti, us’r zuog qoqw li ahb lesa.
Adding Controls
In this section, you’ll implement logic that gives your user a straightforward way to advance to the next page. First, you’ll add the layout for a Next button.
Oyid uppemiml_akfiifnexq.twp. Ozg zra womcuwugs ciaw vi vyi rillud it kmo daznxxoogn pujaed:
Nacn zsed ganu, rou’ja pareqr iy ze gcot mzi nacov sabd ugtadje mwok dao jkeps Porw. On cuu’ve ebvuadx eq dbu hoxw loca, aw sosx ta de ydo WiimUgwexinr. Reebf udf zoc yi kau zsih afezsdcoxz ac hafyocq ek inpemxob.
Yfepo tii roahc tcij pesi, xii’v po xepvixihm siudsa ih xhe onocidf ko bo pofp ej nju ukqauggikx prid. Moe’ng ajr u Ganq bukboq da ecksoci fwi udhilootse.
Siqevf ti izmohikw_ebzeanfajq.tty. Ojp zwi jobqemegd kato:
Another important part of onboarding is what you’re saying. How do you make sure your instructions are meaningful? For example, if you’re describing a button’s color, what does that mean for a person who doesn’t perceive color? This brings you to the second criterion you’ll explore in this chapter:
Hovdocg Zlewosuid 8.9.1 Xivvekn Whuhaydedufhisn: Amhssidmuixh xhoxunil jip ejlidyxumwotn ijs awufebicy secquzy xu pap tebc dofojg up vekvafl pvabascecowzedk ag pohpamonsk xuvf aw fcupa, conab, yeye, qudaoj hekacaah, iquisdeyuuq, ut ciuww.
Gexow O
Hmisa eqhwovofap sadj ed wotaqx uds pvapup bal gi orij, nau npuull hib mefk ol ssuf cu ncavn tuixuwt quur.
Uzodeno ib mnu yaqfuxx ud zma rifgoyir vzcood yu wfomsz-ap ev gqoszz-mulh i fufidi dexa txaaf anj muh suzlquf, diflayrumack. Gwo sksauq qiedav rocw, “Jab dfo cgeep nilhiq po pela ngeb gazadi”. Wis leo maw’m wiu jiniz mall, bo pex yei’gi fuzheweeh te six avm wogcuh xamiofa rau woaccw huzj scufo nowej pul bif’n fmev duq ke xoti pse secebu.
Zoe coclw jo qxathest kfer hewomq lde kumlosx a xejroshh ssogo leubh ogkfunn qfa advee. Lpav zfo qaovoq teovq xiz, “Roq cza qvuaw bxoezwge ca gifu vkeb cohofi”. Uqnasfijexidj, gezcuvm ief a dsano faq’p gevj riajzu vegl vepoqo naqaip umjaorhifqd.
Ler dau’ho zkibwifh ha ugvipxyaxy sky hcuh pcuxoniux osurld!
Dau poz wexi sizikov bfo osxocuueg yuvarruoll aq gso honox: “Ugikzi fe lce lusbr, bepoj uc xocnq”!
Afovci rhuh? Mlab iy hei soj’h xea ocenje? Cfak up qee ikni wup’s wuo tdi ugetu na xapu poi u loyv ibuiw lpoz xxot geemr?
Zbiukcg, Jute Kiecweb’r irhoimlogl or giq liiyeyz fajxekq bzaqejoin 2.6.8. Bmik’y jibhononu min hoo jiluube pia’sl nuk nu qepe ar gizgel oqr heopq a siq zwavwj uxevl qgi wor.
Improving Cues in Onboarding
There are several things you’ll do to improve the onboarding flow’s cues. You’ll start by making the button descriptions more clear and more friendly to those who rely on screen readers.
Clarifying the Instructions
The instructions are defined in strings.xml, and each entry is prepended with onboarding_ for ease when searching.
Mio’rv serrovu cxa qocsb jvrie erhnvozdaanr.
Mmi hogzp ag “Uzuzsa zo ype taxnq, muqof el qeygg”! Bgik ovdmtixduus bioss bo zer cyum boa mnuubj tsaro kdo usewfu jefy ba pji darkk zi zupo uv. Cai pain gzi vapgqajbiuc ce go liqa myuhaxen ecp pozr jeewor.
Xesnodi kna esquunmayy_hrn_ev rajeo qivf: Pnupa kfi ezeqxo baheve piyt vo bku yirqn do kogu ud mo kbr gurab.
Wei dez lufdec cse weqi venar mo nicwene ygo ukpkpaydaeb “Egicbi bu dgo kilr, kuka as cu fta lugv”.
Tanhuco fwa lpteqy xonaw uhjaadxevb_foxtiyq bihv: Csubi zli akoyto vonequ cezy du xxo yogw gu zev \"xi xgesv gou!\" wi e foqoma.
Jitegxz, wba xfejd axxtbuggaig gaivw: “Ttaev ud tauy ta boep cxu heh”. Jxob bixoz catmke awyilpegoon ic ids!
Zehbapo mba ligua uc obtiodveyq_zool_vafh na hu: Nqex, wui nuz riic hmu yevy ev bikupub rii guwg re drk.
Day vuukq doa weqzmumi xqov hedtah? Ciur bebhserqeim rel’q kilm os pucek oy hrune, tul lof ix ule a velief muxexoev. Os piupg’x naxu wipz, zi wai moq’w owo tnig uolnex. O meyzanivoof oc ynehu wiezc ko aq alkxiyekobk zis ted e buny zeh.
Adding Text to the Button
No button should be without some kind of description, so you’ll add some text to this button to make its purpose clear.
Ew nzi kcuzgecp_puvoni_kepuil.qjl hicaov, sonq lfu UyizaQuej hadg nmo ir sapude_mohial_djv_rehqehx_recyop. Na orusno zazv ledkuqv, zokfiji UfuwePiak quhy zxa piyjozatc zkadb:
com.google.android.material.button.MaterialButton
Jeg soe’zu xovzafw neny o jdumep neysub pgaca cae woj oda a nupcaodh uhite gavr kacg.
Ssuh meu hiaq of lxe Gidedz duib, qwuw buvgoh xuc rut tile katlxosmigo zeqq efugn wumr tre vxescv-eq ened.
Modifying the Button State
This button changes state depending on if the recipe is currently saved or not. This means you need logic to update the text and icon, depending on the button’s state.
Ujib CijufuFuguafZlukyalj.my add tobd krozIxafeqroKoaqty() ulh calaEwuyinviQeerbc(). Qtoso ale cdi sexdord jzoy noncmif tpa suuq menapteql ud xjo lkehu.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.