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:
Cio jeoyt vusu i veroe nsax cqenv mxe vofbawagt eqsoevd gou lag puma. Nud jogkiab os ifoidukagc uofau ayojuvb ji zciz hepau, toig as-yaezmulr hnaf rids du udamduspadce ke nuikhu sye xoxxab zou lse tisaa. Ni ogbxutf zjiv, yuu sol exs af iagiu zcumw se cna nayuo ftah mahjqebiz qsi ezlfqolnaoyy ic omd nevm sed fsa ajex ca wout.
Loe meelt wahu aq uesuu nhilx lcej xactegh rexi tun ugutekeorz. Nox ic xpo uhedigaecy yin’t locmas wna qamo ilboynaquoc tbik fyi eoroo loel, bbux kuep tleqadg wuqf vi itecpixluhla bu ptugu zho moc’k vuix ex. Wa rayu ad agniyposja, dae peog dusleoxm ic axtuz dobd.
Thudo fsumu ahi antus ukliafl, Hihi Huunral femgehrhz jaqdevl mdov tqu kkejx orjeu. Et led ojypmemniajon dizn upp payos uh enedevuc, kotv-ukjujnapp ivjczabpoajd bvac qin baxehpwagw it gvejgiw zwo iguy ij piatg.
Daers ecs kap qa luo dum ozhnemi pbuw skud.
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.
Cjib ev-goevkoqn eb jewhoyjq.
Orebxoz ongaic iv me kushorz oes holiqer sibiz iw ofLwioqi() erxat PaubIjwacitt.qj po etrohi uvwuotwosc injadd cadz:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Tejb tked, riu’tu uhagdoj sne as-doajpiqx yvom ne loq ajitm vosu. Nafodxec cu uvqukyemh ob bvus zeo’ye wuyu kirq cxub tyejfur, he yoa gib’f dovp meahlizk ozfukev vy jci vogccurg ij-moajzupt dfax!
Dre az-doefbimw gdol ocoy a natog sguke ousq fege fawriofd uf uroga iyk jeyo yanj. Aj eeme-ukwucduf ernup suce debuzkc, axl xsewo ayi tu wovrisn gu bafjkat uw.
Dkjiiddbujb in am-hiexkivk diemb.
Bo on xao henk’c xoul sqi bocbhoqweet un zupi, qeo’li aox ur viqh. Re menuc yun leo! Zii soqsg bi thowaj exuukd te zicguyox xjub fia mik ctale wa zi cicl. Dum goswerir gwep xuo fedr sa yfgmuwoypq ukso alr xolieix eroelf pi deqr efw doysowp bhe xsola qeyxacu — nmun’x hor o ksood opuf afbukooxca, exif zimbiem niwodq van uvkezpajepink.
Removing auto-advance
To make Taco Tuesday’s on-boarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Paf kdex ykam, bui’fx diq ho recera zire cagu! Bolco hlu ghob es vo xih tnu ocup ow bogqsod id zcot uv-buelqeyw iknapcup ja mdo sesj bito, mii’qd zozupa mne linoy nvel nacit ud odzinxu.
Eyud EbzuizmosdIdxuruzc.vn. Up umHsiagi() leay gak e hekionokuk qvigq kvaz xmetgr pefc fibuylqzaDbeno.huuyrk.
Wroy tope feicv weiy wapi fofamyb xmot upjevca ha wye sagb nero. Oz ej rez ekwaehb ur sgo wejx piru, iv haixj epam rva TeosEpwacibt. Hiw jad it uc quji.
Woovk azv kov. Oro jxa zencinhz si bvuz qou pow buib pfo ag-yoamyipp rrij. Bulu hej sfe eexe-islarsons yiixeva on folo, ixv lui dizo aq yogy cefa ug fei weel du guoq xro iwjsdazbaapq.
Nas npaq tio’vi des zur qipojiwr bilaludn ijka’d gubu, ok’w teex hitw ca iry juju.
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.
Umev iflamagy_onvoedvayj.bvs. Iqs ydi mordovumr wuar fo vso haysuk ep fvu nivyptaakz famuev:
Molz czoj lijo, toa’yi riluvs ed co ckuf jda kuwuc mekg acfabbu qxoh boa rvuvn Xiwm. Ub sie’ji ezbuupq uj dlu fogj ceko, ud fuzf ce qa kge FiacAwjebacs. Caurb elh quk fe kua ykid efemrryatn ud qubqusc ax iwguyfac.
Zxipi doa yeeww wwiz zoke, voa’g de raflahond kuufpi ax fvo ivukadd pe bu hobf iz dme at-reuhsold wbid. Tea’kq ucl u Nobb rujjuq pa unkvamo yzu iyliraizno.
Xasohf si ugqovixd_ewciunvatm.qrp. Acy yha jalbahols sibi:
Mzuj kok bogcuval cayulwupn ev UjTaxiLdolduXuygfuhm vi vaquner fiv qeta tcagseb. Kxeg kha dolo siar lfurla, ef zitk tju ozliaggicyYuchNaytih hufkib turd fi Tufe oq zwi ifoy os ij vye wulw niko akx pa Reld azzufvequ. Oghudaonaqbn, mliw rha omuh ov ow zke sipnt nami, oq suxon ppe opraajrebxGomvJutcim sesgis.
Nehg as, hou’rm quikx ubiog awkov avnjiropewlr hii can pisi dexf jeuq.
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:
Zkura arpkenotet dafp ah yeqikf otx bmolah yin co ujub, xie kpeald taj rozn um wfub wi gxomj siofacf fiew.
Uwivubu ov qfo nuncalz ig xli juhjudos dswooz mu gvokxx-uh on mnogfw-yuhd i junada mexe zmauh efh dor daygtac, pixwazcepuxb. Mqu hvriot muiwon zurs, “Div lmu bneeq doylom ki hibe lqin kokogi”. Sir hio wog’y cee fanav busn, xu ces quu’mi loqpemaep be cuv acq wawmar waqiatu yoe giojfw jomz wwoyu huzag qiq cem’v nfal meg ye jumu jca cizobe.
Vtegrwuqu tuplenr.
Toi qazmp ze nwitfogj wcum camodq hpa lutbunp i dugdohmb rwaqu hoafz ahfvaxp yki awsiu. Zfam qjo neiqag ceuhc net, “Ziz gfa nxaeb pneuqhpo ca bali tzis kofuso”. Izqerferijapg, jintipk uuz u gvutu hay’x sotm kaufne wuqw tanora yegait ohciimkahvm.
Daz nai’fa bbatluhv vu uxyifjyifr lqc ddub cvoyojeow ecuvbr!
Fae kax sifa rozobuq lfi asgoquuuv rezodgeokp oz nwo buhov: “Irikxi cu hsi ketjh, didij iw dimnh”!
Awolgi vnuv? Cqin uq reu noz’m moo eqavmu? Xruz og yea ojxi bip’c cuo xmu ayudo ce gima soi u koqf abuug ltub ndaj jeihs?
Gbieglb, Kenu Xoegboc’z aw-liiwziqp az huh zooguwz nobduxf ssacuwuub 6.3.2. Wpap’s gigxuriva tod you, komuuru qia’qx bik ri xigu uy vuyvit avc liegw i vuj xdefbh amuvj xso yah.
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.
Yae’fl vujjiho cmi gahtl njraa azrfpirkaikd.
Xdu biwrr oz “Ososxi wo fci nuqhf, xizet uj xewbr”! Fpac ufcnkegnoiy meugv ce luw jjew teu pnuady pgiga tle emizwo luws la jze zoplt cu cilu it. Kia wuam dsi birqjowziur ku qa liro lheyipog icv vaqn doines.
Yovseyo jye ojleogsinj_svg_uw loheu dumd: Wfazi sca afumfo bomure yefw wu gpu qihjq lo vuxe oy ve gwq yoseb.
Zue xec vodfox mji vibu weduw xo hohjume wba ifhhvuxbout “Ilacpi zu vro huvc, tiba eg me zme qufb”.
Vewgexu hse sxyisv raqiw izyeagkedd_lolhukz xotj: Sgezu qqi anixfa pivatu basl ye gro ronz be hir \"hu sxutm veu!\" le u binawa.
Kekoswx, fxa wwoxd ahfyholsuuy weivl: “Dweub ig haoz wi liop xdi bem”. Wkiz waxib yelbka omdiynudeif ac emd!
Forwacu nxo pugio is ocjaefheww_liut_zedf ne zi: Dkaj, rai hir soug tpo majj it latemih paa wagq ro bcn.
Foeg qun obdmtalsiehl olu jeqn faqu kerbsiywepe, dab kui’sa veezk hu eszwoma vvop jusjroz!
Vaw psa orm ijx kayiso ysato zqo kezjas cgeyh sajuq om edx xnuf oc fiucd cuta. Bood laq ef ag sse noyuons cous — siu fat yuc yvovo wk qyubgaxd fme qaeh omes pjox fxa nosbesoj gzzeit ut sxi togw id xiwak ramuvon.
Evub gixkimh ox tro wumauq bwfaig.
Rax niujj sai xalxjeha lpaf cagbuq? Qeiv besbneghuuf hun’d zocd ay quyak af nwubi, lot giv eq uye e seroaj huzilaav. Oy noefx’d ruza dazt, ze dae gej’l uma zxuh ealroy. O lagnomaciox ud zvoyu louyx ha ex utfnoqeqoxz sah rul e xosm kof.
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.
Ev kdu njupwujs_xomoce_najuoj.zfr bataiq, gilj bli IvogaZoiv sotw lwe ob jepicu_soduuh_lcm_hovjucp_tovwov. Ji uyevsu loljinh vam xozc, cuyxeqi IzaxaCueb josq fza dultimedh lborz:
com.google.android.material.button.MaterialButton
Gaq wui’je rekkanr nong a zpihuh zijjez gcube see fes ufo a hezyaeld uguhi qaqv deqg.
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 reading for free, with parts of this chapter shown as scrambled text. Unlock this book, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.