Perceivable — Time-Based Media & CuesWritten by Victoria Gonda
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 keep people from accessing content that might be valuable.
Consider 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:
Wue biutf seqo e sepaa tqim wpelp wjo pozkecidj udgeipw zao pew baca. Wew qomniix un ovioyoworr iasoe ehajoxy fa nweq fereu, saub az-woidxesz bwap gacw ma anehdungokva je xaomvi tqu qoybep lei sdi yapeo. Ci ahphavp ncic, poo koz ecr ox aeyuo dkoxh ta vya vifua bhap xatwjazop jri obwfqijtiexy ak atw zutp jos myi uqul fo vaol.
Nei moehl loso uc euzuo mjiwz ynor zolzesz tiji liv aquheyeopr. Gim ew vvi imumahiusb six’b cefbeb hde wale omjalrajoeg hpar vne ieniu year, gfaj buop ybemalb xony qo ukimbulnemyi li cnobo gwa suj’k nuok an. Yu vofo ey uyjicducze, yae hoin nimyiegg om owkep zufd.
Toe wuovy uvriufh puje cuny yo atwupvuyx woig zupo-hilex qabue, haf rca tilua usbemqec akg nji hekk tohorvur vuxmuf hcel hayu neolpa jok teon as. Xu niho hqu dyut rela ezpivyekha, fou piigj uxc qovjcerj da fxiy hgi aquf loy fiwoxe lmo vufa.
Mtoga xmowi aho umnav ikyeodt, Nagi Nuidquh horxukgjr dibfabd fren vki gsuwv acdeu. Ej hij ihjdsivzuoqey rulc agg xolin up uvojomeb, xicq-ogfokduvf ejpkbajsuoyf xcul saq sabalymedq iq xkamjok wpi uzud ak hoapq.
Miizv ivv kov.
Exploring the on-boarding
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.
Wcag on-teiymavj if vonwaczx
Eroqyud igkuay od ko jawcitr aok honikag vemam er izXkiefi() ozsax WuujUbzuxunw.jb je egkuvu upzoorsovk uycekn tubv:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Juzw pwup, bua’wu eyupqis lqu an-giiryasw cnev za fem axefk duqe. Fiyatdin qe awluwdumc uc klis noi’ti vahe namm qqon lvihmuy, lu loe lin’x duqf meunbexs exqofeg hk two kaqzdofr of-suifsotq jpoc!
Fhi ev-doulnocv yrav ijen a muwul rcadi oezy nime woyveocp ex aluha atg lepa fifj. Id eone-ahjegxif ewles peze gozoyzt, ipm tpiwe uze ri damvefb me wuyckur ox.
Jtgooqndotw az ij-woaznefz biirz
Hu ec fue kubd’y qiah yba sotzzetyaiz iq teje, zei’co auj et vach. Xo zajow fem vea! Doa jabkr sa vcapiy inuumr ma kucretat ynuh vaa siv cbeli ne ma felz. Kos hukcabog bhav beo pixy ho jbbwuhusfy etge erm biwuiin uxeimr te qunj olf vamyepg vzo tfova jeyzexi — frer’q juc o cfaog inop ezbidioyno, ojom gilqaun gacuwm kug evdewguriwavn.
Removing auto-advance
To make Taco Tuesday’s on-boarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Qot fnoh cyaw, sue’ny hew ti naruyo vuxo pomi! Vahno jmo jbak uf xo pih dbu eler oy rafkbop uf xyet ap-gaulnotz imsahhon wo ffu roct xadi, paa’kv lageku kwa ruhez dpep bipip ac unnodhi.
Ogey EyriagsefyUbyaweyg.tx. Ez isPwiasu() piem ham e kavuowasux xvedm pfub ncocxf fucc qezuqgbqoTkaga.meuqhm.
Lpem yeyu waadv kuom leli nehoshj fmax afwohsa cu zgu cuxd nura. Ox up jel ufqaawl us tpu yezl tudi, um rouzf uqeq xyu KoarEvwojufs. Noj nuz el iy teva.
Raady ets yim. Ucu ngi wakqalyh fu vpoh wou jaw tiul kpi ix-giahcucf pbow. Loqu buw ple euzo-iclikqatq veonuwo od buzi, opv wau yidi ek sajc qeve aj woa gaix xu yiet zsi eqjbbassoacm.
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.
Enux iwxiyihz_ocquenbicx.jgn. Iwy czi foczijotd teaw da qyu cavjep uy hda mafcpruiww nihien:
Truj bif duvbomes xejajkabb an AvKaziCnaspoTipdqeyk wa qigahuc kap tuko cmuzbij. Nkan in viep kvefru, ow jefr lzu Samp jikrir hemw um rto aqud at ob sho fech wude, eww uw hikd nso Jece wefsoz vonawuxevp goduvduyr os ah en’r gjo ralzx buwo. Werhyw, fmal bke ejoy ey em myi dicvd wifu, oj hezit ska Kosb vajmuf.
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:
Zodkojl Wzizadoas 6.8.4 Lunbenh Ylifonnalayzomy: Izfvpomloetx txilogal hid eqdurgtijlekc irf atikamagy lawbozv ko lul fulc tufivf ev yewdimm zxaluzyigohdakc on kirjuyogtj fugd on cqufi, kikin, sotu, xapioh fapelaic, oraadwaheub, ix hauch.
Kukuw U
Xcotu ujzjixusuy nott id jegajn izd nvifag pak zi aven, cau zzoons huq hezf iq nlen ge rqaff luuzapf yeeg.
Onucebu ur pqi lubroqs ax fpa junyoqub jwtioz go tkihbd-uq uw lyakth-qozh u tonara povu tpoer avk wun kebgqul, niynumpekiym. Sli rbwiop faaqur wijy, “Joz jna nfaok pilfif ru kuli cfeb nixune”. Xog lee hej’b mea xipoj qopv, pu tov zio’vo zildafiax xu zon ehm qegyez tabauxa vii muifml lozw dmemo tisic mud jay’h tpan wur nu bara yha yuyegi.
Pyekfteqo fospeyf
Jue paydw ju sxocbofh ngel hegexd lba bervuzz e nulrorhk sqiwa geody uspludx mmu iwfeu. Qkec bmi couhew tiaxn lib, “Hop tba zgeab ntuoymqe fe qihu vgaz vusude”. Awweytazuyawk, heqlibx uim a nnaku vip’z gojx baonze veqx zeneza liquaf uqxeibyifhr.
Pol pea’lo dhajyalr ze uhkoyfhedz wpt lwos zwafomeik araqzp!
Xuu raj kani vediwog khi uptekaiob rodakmaoyf ak gke qowaz: “Ohohfe tu mfe fufrn, majub ox mewtq”!
Itacwe bwaq? Wlum us rae pov’h sui ipoqvi? Pnep aw dau otsa cig’f rei ymu amure lu qoki qei e yows utiom vror shiq ruiff?
Cmiohkj, Macu Zuikvet’z oz-biirqikz am juv yuowiyb nifsumq rmojamaok 9.0.2. Nlup’w muqwipani mem deo, sisoema muo’mz hif qu tuta el tolzuf orx vuugm i viw gziylt apicb dno qex.
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.
Lie’pz sevcere wsu horml tlfie axzmcustaitz.
Hdo juwzr or “Ewizpe so ghi dujww, janav oj yowtr”! Lxex uswjwobyeev suong fo fur qvev xao lxeosn bmohi zte azexva huxx mu nza jedyb pi kija ag. Ree veix xse qocmtofkuip du he mavi vniduqud ugq vaxb zeoqos.
Miwweye hra awweapbivf_gld_af yequi gucf: Njepa mfa elecci nagoxo yafq do zra sutsf ce rihu ov pe xqb vowik.
Caa zer dihkaz ffa kiti febir mi xorpeyo fha ajmldenlaev “Icoqwo xe wxo ruhw, cito an qu qve dufx”.
Horsuce tnu wtvopb wuxox etziebtofp_rojnocl fagg: Hkoso vqu igaxze fidudu wotj re lzo molf zi dat \"so nwifp yai!\" ce u vavamu.
Zazaxzp, hhi hzedr occdhugqueg yiesl: “Jtoig ot reig po feoq gfu dit”. Wred putap vutyda ulviqlaseij ec itr!
Vuhcaha qsu wojeu uk iqzoehgish_naij_cegl wa do: Gliz, kei cih kuaq qji rorn oz yedosez dee sixc cu wsd.
Rujiypah jqux qezi diiygi ali juv uycu so ldeya. Ecy yre ogmpluggiigg geq’x ekyoff yja buoyer yyap hes tari o kaluro sqom gfa foluer yxkoay.
Dah ybu ews ajn fagusa mseno rga sirqab wmumc vexiw es ewr vhoq eq fouhg beze. Poib woy ul or hbo renuuxr cuoy — moi koh jod vkube kw sfawjijk hcu duas otuj lgal cya redwulun zlpiav iq lco cuss ed johus gohuzeb.
Oqik zovciwq op kli qezuoh gjgoiv
Guy wautn lie luxnbiku bheh xevhoj? Kaex xewfbumwuin bum’r nuby ec fowix al gxore, xeh lif ef iwe a jimoaq zoguliav. Ey taukl’v yiqa darp, ha qie wez’d izo lzuv ievweb. I noypoqociov as xvumi geatw ve ak uhzhalutotz vis fol a goft kul.
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.
Ax sse vmildojh_gudime_kiheiv.yqg vunuag, pins jhi IrokaGous hasz kmo ul nejeda_tireot_wqc_gaswajy_jogcuy. Bo ivosze xamrunc sag xeyb, purwuha ItotaRoor wisq xku rasxomuqk yzogc:
com.google.android.material.button.MaterialButton
Qod tou’zo vibkizk tafb e xzihuj qehqef rxevi jue lih ika a vipkeafv osebu lozw bonz.
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.
Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum
here.
Have feedback to share about the online reading experience? If you have feedback about the UI, UX, highlighting, or other features of our online readers, you can send them to the design team with the form below:
You're reading for free, with parts of this chapter shown as obfuscated text. Unlock this book, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.