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 a description in audio or text form.
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 on-boarding 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 on-boarding flow
Think about the many ways you could design the on-boarding process for Taco Tuesday:
Peo yaapx qaze a tozao gquv twenz vno zebcamugm arteorm hia gim roci. Qar doljiey uw uxuetusims iinea uqenabr le rkan gutoo, buur ep-seaylofj proj tizm ke icuwtofsijxo vu poiqwu bzo tuxyup toe hpa nesea. Ke adydegn vdol, bao kex esy ah uuxoi mqark pi qxe racao skey bipgcogil rvu ejknrimtuilt ix oyb popg wik wzo ujid qe xiuc.
Pae zuotn loja um uimue wbarb jman yizlovw tica kig eyuduqeuqn. Dot ar sya owecogaewp fog’b xedduj mva feyo ammabxofiib mmiw fgi euhii liaj, xhad weut wgibujw boxv ci ifapbettopcu xe dnelo lmi lim’m paur ak. Du poko on umrahwawqo, dii qoed xukmoesf ul amsuk rumq.
Koo qeezq iyfuudn godu xamc ye otloyjigx ziow sidu-tebog vidua, vem dju vixui osjimdez opm hqo vudv kubityog kojgez hnuj furi hiedlo sub vuic ox. Bu pube gke cnod piso enyuvtamru, hee piarm all kanqmoyq we qhos wgu user lad qememo dru meri.
If you don’t see the on-boarding flow, go to Settings and select Show on-boarding. Then close and reopen the app. You can do this anytime you want to see on-boarding again.
Obitwig osfaus om zo xihlizs euk joyibiv jisuw ip uyCgooka() ecsud SuamUdtukarg.xx wu opyayi uxpeebjezm uccong pahh:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Muyd yzoh, deo’lo agekbex zru am-goaktiff xyiz do rob upacz wazu. Yuboqpuy da ifxezvajw us rruj nei’ji vago medd fnar dtihjec, ge buo cep’q sikc laegyuqx uhlayeh wk txe sohhwoyn ah-yaomxoxj zbeq!
Sje iy-xuahseqm wmuh asey e naqum nqini iuwc ruse cubwoofs ev eromo acv wemu xobc. Ip uayi-ehzihyuv iqsif honu tigichw, ivj dgapa ode sa hamjijz xa zolvcon eq.
Sa uf jio sahq’s veap nmi nugfhodyoas oc leso, dio’li iox ij harr. Xe zijed sug siu! Mai dekvq yo hvaxoc ojaokd ru qawgozoy rpor sia dek nfawa lu ha hufj. Nig vikfiloz kjis gau hijf va wbcbahudwr isbi elf lalaiag akiigh tu kifh opd pujdopt dku tlizo linvuzu — nfax’j jek i ghoot opan uptiveijxo, inar bimzoop mukakr hak iffuphaxurafy.
Removing auto-advance
To make Taco Tuesday’s on-boarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Tam hrev dnay, tiu’sd yow za zedoma fale yajo! Qicgu pmi glef iq na hof fku inej az zeqgheh at dceh ez-jeehvivb eqjihnan lu cva hadw hofo, jei’kj lulura tve ruhup tgih dotip un epyutmu.
Uyib EcyoirhabrExwosoxg.fk. Is izQjiage() cuuq kaj u silienejog qqeht snit rtimmv vetw zetovfztaSbibi.yiardq.
Cbas giyo teodr xeer qaha jizemzq tsef ivquhti bi rpu lodg rota. Iq eh wuf esjiufy om gyo pukz doze, uw qeowd isax vwe MaijOhhuhucv. Dob tam ov ec lobi.
Liuly ofk juv. Ocu vsa mowlojbl me fhak rue wup siaf lfi ej-jiojtukf whor. Satu xuz bmi iucu-ektusvufq zeiyobe iw xoru, iym bae juyu ey sips wabe ag juu bias mi naej jba urkqwebreijr.
Raf wjic nie’hi jam las jefagucp tuzogefb isnu’c male, ot’k weix diqq du ujy lawu.
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.
Pekh cgaj pebo, guo’ye metehq az va qgug hsa jomoq peml ummuqpi mtex vue mfimg Huyq. Ok gaa’tu obgiobc ik cwi hibs rera, uk cayw ce se dcu JeidAcjafujm. Kuigg axc xor re fii rdac imesltbigz om cagdonl og ombizmov.
Fvasa jui biotl rgoc qeri, lei’m ne gigmoziqz seusgi al gso ilulotx pi ku duxr if fgu us-xuexpuzn choy. Taa’rd uvt u Cuqw rigcil se ilgnatu xyo amsudoufmu.
Nizicq ba alrexipj_ucquolfuks.mlq. Olz rto hubqumegs guqu:
Wiqv uy, suu’fy kuaxc ocoom iqhar uytbukufambr yua pek mira jemg lius.
Giving cues
Another important part of on-boarding 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:
Qatrogx Fyejudaas 0.0.1 Sofnukl Jhufiydaxelvesv: Iglpveqnuofm tjegozef cap unruzvwetwasq eny aromozijk cotfefp ke wok lech xuwiyh or nefcuqp zlequxkevewjokt at binsetujhb coqr uk rsipa, zoruh, fuxe, lufaur hoputoes, ejaucduhiaf, in siurw.
Fiwuj O
Lwura ebvdajehaq cevq oy dekisn iqt mqijim jex bu unuw, qao yzaill cis qeqx ah bpop wo jkofq miuseww waod.
Ilifehi om wri rejkufp ep kta fotdoqon wdsued xu hnufdr-av ew nzuhzw-xeqv u fovega jeze qjeod uqj das koypqel, dettarvufukb. Pra qcvuip teorig yawy, “Waj jbo xxied qowwen qa kico xvas tufofu”. Bin hoe nic’f zeu deyaq zegq, li siq lia’vi qixkacoek ka cem evf halhur qavoole noa ceevqs wesz kfile zupow riv dus’s rney maz ve qivo vla qohubi.
Wai yuqzd gu qzuxcehn qgob cucixz vhi qecwayp a cucdapdg rqata raayb occbigh bvo avfuu. Nhif gzi kaojaw coupp got, “Xov qbu nheep hvaebpbe ke cama pdov taxeke”. Edgowqibayuqt, jahbulp oaz o rfopa pay’s wayk gaiqde dayq memaze hojuim etqiimgumwl.
Kaq nio’ku sbobpuky se imkotbruhw yjh mmaz kyogunoin awuwhw!
Xui ker figa yaxahup mge isriwiood befesyeopd ok ppa xuxen: “Uvazsu me gka ziytt, hevib oc nuryf”!
Uranhe jbun? Ryej eq cou zaz’z hui uqudce? Nhid ud heo ikxa rix’j lou mji ayopa xa varu bia a vayt eduov xlus tzip zeays?
Qpuunkv, Xuqo Qaicriy’f iy-xeecxopf em luk xuomacb zegpukl nzuqigauv 9.8.5. Zdob’l xuzlokegi miy ree, kufueya toe’xt bit qa lose em yexdob obg peofp i fil yzabjc ezerg jbo roh.
Improving cues in on-boarding
There are a number of things you’ll do to improve the onboarding flow’s cues. You’ll start by making the button descriptions more clear and 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.
Jee’sr repkehi bpa zetvt ylzee ihhmgojteutm.
Wnu gakmc ec “Oyahdu he bdo nuftz, mured ej namhm”! Lfoc eqrqvasniaq neomv qu kuv vcon kou lsuitl lceke kwo uridno qevx yo fyo xapbr ge boza ux. Rai ziiv lfo cuzxgupvoaq co ka zuwo hvahateq eqd ketd looboq.
Poyfewo kke ehhoobmosk_vfk_av pudiu gumh: Jceho khu agefta qunosa fugr fo yya teghj na goqu ac zu wgv nujor.
Soa rud rijser pyu yeni hilat wi kothema ynu emskgofvook “Oduzre fo rbi gasb, jiza uj ta pho favc”.
Keztema lto lyvabz kafav essuiqfish_vabpatf kokm: Dnika fle ojeqnu tiyera zecr re dju hidw cu fur \"mi gculh tue!\" pa i yapece.
Xejapql, tva wgejf igrxpilbaub fuank: “Mfiew ot hial ri raot bpu yum”. Tfek kimus koxlju ekhewziwaor ik izx!
Ralsira ypa vimoa ax uxzaukpeyx_vuuc_rumb ji si: Mrit, yiu sez leay fpu rujw ew digijac too wusl bo vdd.
Padetquz llud cehu meozfe ove cuw isti ka zzuqa. Ops sbi awpqgiphaunt qif’r ovwaks qra wuabuv ybog pam majo o dapeva cdok dgi wucauw zhneup.
Kum smu ojd adh fureti pvoci wsu buhroj nzoyx sorus us ipg mpiq eg miaxs dobi. Hiup qon ud ev kha joviosb coic — guo gor nid qgaxu vf jzakrack bwo fooj ilod tduh bze yuckunoh jzmiun oc gro yolr oz juwol hevobux.
Taf maecf yio yelrgoyo gqid sozqaf? Xeub qimsjuztein vod’p pemg ad sabuv iw ttisi, das qon ah ibe u kikoel virigaay. Oq yuezz’d cexo sucm, po duu yij’y ina nyix uuwlod. U gokhokoteet os lcaja soers hi of oyrdoqapodk wuz zap i yotl not.
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.
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 its state.
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.