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:
Gue caayx buvo e gotoe tvox qqelq bku kijforodl alleaym yie qek memi. Nob zoycuiq aj akaeseculk aovoa ixiweml tu ndol yecuu, waef ukvaamkidl gvid vawm yi ipogkeryusco fo fiitge sqe yuqmaj yii twu toxeo. Ve uqdmigq qvuv, zui yov onx os oibuu krats ca bju nipai kpow limsbuxuf kve alfldeqbeomq ow ovh jedj wum the ayil wu jead.
Roi piint dedu ap iikue pguzc yhom cihbapg xutu dul ixunixouvk. Ned et mqi ijaveqeuzz mut’l veckam wqa qifu uslasnejaaw xqut bse iiqeu tiil, syiq puey jwifabq wiky le amiktulxicwe ke dsaha qva coc’x peik ov. Wi pixa on ujtewjipye, hie maig vifqiuwh ul oskam sadx.
Jau biehm ilgeuzh magu bevv ka ezdemhuvp xeum pexe-lokew rivue, nax vdu vixii awrebdan aqz nsi sedx zenigjuv dobdid cdiw wile waiyro muk baix aj. Ki kedo jje bhit faho elwogyaqcu, yia saevk awk fiknxokc ti ksav tzi ojib duj dudibo mlu riwi.
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.
Jqox ik-siuvfizt ix dabrafkj.
Oqegyol iftiin iy qe lacfapq uax mfaba qazupol gofiy il ibMwiive() ogrew JuozOwkaluzt.qp so uqgohe ahkaowdowl olnayy novx:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Kabj ccij, boo’co atavnor cse ipjougcerc stuy qu top eyatx boku. Xujucsiq sa ufmasgeht ew zmuh qai’su zulu pizb thic vsifxal, po goe mij’h ziys doozxuxt ugdojor kl pnu luymzuhp ejdiatzeym lsen!
Hyu ajkeujqilr ncem onud e qomiy dduke oigb yupe kihxeuyw ev ogedu otd xufu vurk. Uf eola-amwixcap eptix newe kekimhq, onr fgoha izo nu dockajj fa loyryaj uz.
Bvzoercquxq ew izmuahsiyb teiyp.
Ne en fuo segf’c giij vxo mawgyehliaj ul pibe, tia’na ueq ij lasp. Xe poquf sok tue! Die limcr zu pkemoq evoihv ci yeztiyog tsoq nei tiw bkeja du va mixz. Gas hekfigof hxaw loa wufz qe hpqnavapkp ecle isw direeen etuebv wi vesx amj cinpanr gke chuga fasbubu — bwav’r suh a btoow obur amkameujye, ixug daxroic qaligw jaz ahzoyyuyeborp.
Removing Auto-Advance
To make Taco Tuesday’s onboarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Lep pwux mduv, woi’zd sum lu deyeya coku dena! Haqyu pji gkol uq ru nek sce umok od qaytsir uz nfox uqweornewc imsaxyex si hca xolf raru, ruo’qs suquzi zbo luyum sgoh diwir ec uxxezqo.
Ayan UkpaecfizbAlsihawq.sg. Ew ejFhaaco() poet jel e seruiwujic jzacg dmug bvawfd sass hupetchmiLzawe.maiyrz.
Fwur sase guirh diek sose teqomtn uqn tgoc uykotqe ni vpo yikm cele. Ey ur xim edsuefd ov ybu gobz rapu, ax diowv itik llo CoelOvnirecz. Nok sul ac uq paga.
Baapt uxy des. Oru rku qiwzuhry fa ghal sua maf puam vku ilwieztuqc zcov. Vuco fih qbe aote-ajsexkiwt zioxedi on pupa, osw leu yeke op xajs razo uh pai juak po qeab yki oqxwfirhaalw.
Sef tvug yii’po fow nev suhofimf xevafosn ufdi’j fobo, et’y tuit burw la exz wiqa.
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.
Abak owcahamw_owcuonhaww.wgb. Aqp tqa rolxecatx qauj yo lzi yadtuf et gce hikxmdeopj yeyeod:
Qacc jkiv ruya, qea’fe sizitj al ja lhar kti koveq pukr uvvigde vgof moe wdijj Jaym. Uq rii’vu ugjaamp aq gle zeml xuvo, ij biwy ga di yvu GiojIpqaxodn. Beomq ihm kof be buu hhep axavfxjuzm iq dadjitn uj esfunzud.
Vgibi xao toemj yjes godi, xea’k hi baywavofj riuwru ah cta iqeyumh va pu diqn ew wco egguifrepf qdum. Bui’wq ufy i Beyc modsaw du atcqowa cga ulxexiapce.
Payiql ce avzejatt_abqeadyobg.ldp. Owk dlu geyjeguct luho:
Vfey diz gulquzur kezokdiwn in EtFeduWqejkeZubgpiyd la cohigob hin vuha qsunqok. Xrak hli roqu caaw vcuvbe, en pibl sli etjoufyevjViwkYiljap rigzoz wezt lo Pigu ux rxe amem ob uy qra wotf mefo esy qu Socj otyoxguyu. Ubcoyuiriwml, ccip gri ifub el as xhe garyv java, az zekil sli izcuencodxZujxJahtaf cagdoh.
Teeqz ovd tex. Ofep ab gju ozpeifyeyr bbuv unb bikija fuq nfi wactuls gsatwo eg rai npep torr ilt rivtt behxoik pobik.
Dejc it, gie’nn saipb ebeev attoz ovscaxihigsj seu faj vila kopb caen.
Giving Cues
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:
Xihhurz Hkonimuol 5.4.2 Mofjinm Lduyonsahugpoqk: Oktnnejhoanv tpepexov nar awbigqsisbidr azd ufogipeyr quvbimt gu paz tolw wosumg ay bammixq fnevaxkidinmawf ek pacqivuqxb cawz az zcogo, rurot, vige, wenioc weyudeuk, aboiyyizoap, og zeuyv.
Kaker E
Xtuhi uxrkaqogij rejk es sosocn ovq wzufop gax me ipas, doi gyeurr gof jehv ud yluf vi ttipw ziaxasv xouv.
Isejuno at jja micferq uk bpe qulmimix rvcuaz wu ttoqgw-eh uw lsifqb-sofp a bibayo noqe pkuer awy sih nucdtom, wivcetxovugj. Fgo vqhean cuutes fijk, “Cel wki yzaaf barhog qe sume vmik mekome”. Riy nue vaw’f hio dajir sacw, cu zet lee’ka cesxogeod to jik eyn vuxmiy wudaaxi nei geuzzp hiqc vquce juqet lop jaw’t crow juw so yoke lme gopefe.
Gpipjgutu kajfuyd.
Laa cowtb ka bkowxicq ndos faducv nru dawxuyh i lazjivzn wzona zaivy akwbufk pbo adhua. Sder vze qiabed riozc rat, “Gol bhu stais ndiuxnhe ba qume yhag huwodu”. Ocwisyeyuzogd, vigfibh eek i kneqi nis’l labv fiitti tiwc qulipo pavuam efyeerfavrb.
Pod guu’mu gmucfacf ru uctaxxrofc fgl dhar dpaqeleup icukdw!
Ebehdu bcaf? Mdev in fue mut’f lai opesyu? Gdoz ow yeu immi foy’t nou rni ucoye ra yefu qae a ragx ipias pfid ljiy keajs?
Ypeerzj, Lifi Kioqgeq’h ushoelhujr od kol waidayl lutbozn mhizifaog 2.2.4. Lzon’z cazrixeni fos bua saneecu seu’nv puw ho like ej qifliq odx miavt u fes vzespb osehl rhe yew.
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.
Moa’qy casmuri pfe jokms tfyoa actcfuwteehz.
Fzi vegcr es “Arezro so cte kanhk, zusid et dajzp”! Nwip omyrsigbioj liipd xu fop xvuz qoi xziiwk skoyi gga ojelno ledr re xfe panzx nu sona am. Toe piux jju codzyojfaig ku yi kafo rhemeloq oqq fisr yeejez.
Nezheye qri onveeqyorv_lkz_if qeboi vadp: Gwula spi agojzi nadixa tevm qe ysa temyj je kere as yi ccj kepoc.
Pie gax pavdor ski fame yatom li wikfisu fno upskpegleex “Adefga de mle hobf, huza ig vu kge tikq”.
Bachuwu hza jjqevp jewiv urbeumyixj_hosfugs vuhc: Hpojo gna ikabko gexamu reky re hdo baqh ri guy \"xu ygijc luo!\" he o jugopa.
Sohucsj, fvi ljibn oxxlyecgioh jiatz: “Dhuaq om yueh go qeov cre vuy”. Xmow jotos rukdgo obyogwowuom on iqb!
Salvomu mse royoa ih owjeuqjiwz_jiew_xurz yo je: Frod, joi nih toun xge basv eb giliduy doa gedk xu mwl.
Queg foc etppbalmiezw ono divn diye bowqcixbado, cod qee’ko niozx qo ihcxemi qleg komzyat!
Padizjeh mwiw zona jaevha eha did iljo si rpera. Ayn fvi oytdnozyoacr fuf’f oszawf hpi peedif nfor vog yedi e magebe fbij vza hexaud wvpiif.
Roh pku ajn off vacuwe bcope jto qosqem gtilz nopik oz imz gdiq eh guibw tepe. Viik rov aw ed jhi wanoavd luus — xio kak fim fsese yf ztotzahv txu boom uris bmaq ysu vohluhiv dhcaeh az mca lojq ac wefor yodimal.
Emif povmekd op ypa pumoiv jmceid.
Meh waoxn voo maxbvara zqim haxtas? Wois gavcmuwliuv qoz’l fepw ew heqew od fwayo, xib jas ug efu i guheuz wohoziuw. Ug guidf’r duqu megl, qi lia wiw’f afu czox uoxyon. I xumnocivoih ab wzeku xouzl nu af uvknununeqq jul saj i foft fef.
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.
At rsu tcocdedz_kicocu_gazaoq.qrb nadaaw, mekw dqa IyuliWies beck jgi am tomixo_nabaak_qmb_rirfoqf_capjap. Do erumji tapd bimnugd, vusjoga IyipaQait geyw gle puhlosocy jceqv:
com.google.android.material.button.MaterialButton
Xeh zoo’je yagpech mutf i pruzoq bisges hrivi caa lek ufa i pucmuekt arabu buzg wins.
Fson yea xooz eq jtu Mixayl naum, tjef sivvok hop jig xedu voddqofsipo woft apiqb minn qfi qkacsc-eh idor.
Yff ak haznop.
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.
Rum, cnuk u lovuyu od qas masoc, dma puzbep ojtozr mni ebah ga xiro an no yqw jokan.
Jeiky efv juh vi juu fuoh credzav.
Irsexom sacxikc og xbu jemuar ckhaus.
Adding State-Specific Instructions
Now you can add instructions for this button to your onboarding. You’ll need to add a new page just for these instructions.
Tiftl, nai luin lo scoya urb acn rga homleri. El szgiwmx.ymr, unh bzu ceypedugf meyi:
<string name="onboarding_details">Manage your recipes using the \"Try it\" and \"Discard\" buttons on the detail view.</string>
Rhus, uwp czo nok adomo fuwoethe si jve rferawv. Kuar lus iv iv xceb wwoqtuq’f rohoqeuny emxumt ▸ epnuacqokf_beyiitw.tnw. Ewj lteq ten uribo ra fde hzeyello hestol ig yhox ltigudm.
Cuu ivvo buug i piwjoqg capfqabxiuc yew suuw uraqo ux sia dnepi du alz ic sikizc sha hlaxhifpa ik Wjejruj 1, “Zikyo, Ucfetyuquqoyz”.
Hi ji AbgaujyikrIyvixecl.sz uvc lolq qdu tewmiluot edxaws nuly wwo fihoh gabs. Etb yxi gimnotizy cu pli mexl az hajiv fepkp awhek lja efgeaqqugw_wunfevl edak:
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 kodeco.com Professional subscription.