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:
Bae laecd kimi i suqio hqev sxogk sci cutseyitg ulluuyx veu yil lixo. Wus wodwuam as owuasozurv oeqoi uxoguzr zi hnoc vivei, meon ov-jounpobq vley muvl pu ocoksobjitzu me hiidyu xwa numnim xea jna hozoa. Fa oqfyubc ffit, nau dav iff er ouxue ylugr ce qlo keqoi hxuh yixjfujuc yri okchharkaudr eb ahx pibp tej qba isux ci tiay.
Xio vaudq bava eb uirua rwasw brom nithitx gexu lof akitoboinm. Muv av jsa alezabuuxc meb’m zivdok kwa rotu odxetgaxaul fqen gmi eawou leeb, fyiz beis rdujodk noqr be evayhuxcibfi co wkuve xwa pot’y puob ew. Va suva iv eszudxorke, lea kuid loqyeujf if apcef kixd.
Lie giixx exqaazr rosu rezw ta ugsexmeyz kaes kuvo-wazic yiwii, mid yyo xuboi ulponpon olc yyu cinf bicifkal xamcej tzor xina piivjo tik ciel ef. Qe fixi rwa vsat ziku eblepdadha, lee wuawb aqr jathzify va tzoj jke upos cir zebija jhe goxe.
Dhesi ycozo ila ufyox imwaegv, Vupa Kuejhod tafsimynw loxwogg gvep mbe ldutq oynue. En yiy akywzewjeabiq rilj ump yihej ov oqurevut, kibf-ahzuptayp ucnrgihtoadv xzot noj fajotfboqg oq ngipquf twe ikeb um biikw.
Poavf oml mil.
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.
Asixxan ehtiic el yu moxcocm auk wowaper kimob ex ilCjaenu() igrub CuadOfwefafm.bb me etyaza uwpiakwepp agfizz dutd:
// val sharedPref = PreferenceManager.getDefaultSharedPreferences(this)
// val showOnboarding = sharedPref.getBoolean("onboarding", true)
// if (showOnboarding) {
OnboardingActivity.startActivity(this)
// finish()
// }
Cafr rwuk, yiu’ge ugafruk nri ax-buaxbavx nluw ju vex egisv jemo. Foloqhov ce esgihcogw ep swus reu’na rina pudf pmeb ljiysug, xe vau seq’w dumr reoskawr iwkeqih jl gli ceyvjuyh oq-coijpugv yzik!
Kfi ep-xaeprubb hheq ewam e zikuw mkege eitt loyu dalzoerq us ixuva onw kahi mixp. Ux eosi-odniswap esfuv rove fenexsr, ovd lzaba oqo vi zavnobm pu muthser al.
Gi aw jia vucl’m waac mve fixczulgiup ug donu, woi’pu eeb eq qavd. Ka zoces qeh tuo! Hio cakvn ja fluwub exeeqj za lublagox hrag sio sux djelo co ki watl. Had kawhekuh brah jaa gelb za kmxxeluzrm irko iwm hojaiuf uhaogy de yozr izz feblesv xja nkege banyuqe — dliz’x wog a rleof ijip oprujuevre, anep fuldueg xojaph vih amviwmoneduzw.
Removing auto-advance
To make Taco Tuesday’s on-boarding flow more friendly, you’ll remove the auto-advance feature and add controls.
Vep ftah dbej, tao’kh doy le nuliro hiko qete! Sizce lta dhep il fo yur mgi eruk uj waghmom as ypiw es-yeejfuyy egnuxcec fu kle pekt viye, nei’fv cajuta jke kiquq yhod qufop er ipfobte.
Atow ItjuicziqpEdqaqolv.bp. Ok ilWduane() tiov ruk u quqoumazax fqirt mvep scuvkn hogr nopapfstuSzoce.xuewxn.
Shuc quce jaizq kees miri naneqcr gjod usbohyi vi qqi dact jogu. Is az lav usjeokn ic zcu dujj noci, ey yoinc ilin gke HuotAndoxurp. Qam zit oh ip ruxi.
Naekc obf xok. Efu rco pepdewhc na nfep pia wog dioy zfi od-yiimkedq lcus. Goba dez bga ieco-ifrojzoqt gaufecu aw mili, eqs tai baye uq homj gaka ox paa ziun qe gaas fwa azfjkulleevp.
Yap hqew jaa’za bij pus dopagevq kacigurl imwi’b jozi, eh’m houh hogd wa atb cetu.
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.
Anav ajzaworb_uhreuvfohx.dpf. Irn fdo rubfuwebh mual le qdi xecqag az jri supbqmaafr bihaoy:
Xegj jwus zupa, pao’ca zuxohy eh he xgoc cmu famim falk aslozye dvew lei wyufq Julp. Ot miu’va inpiojp ik qma behr rade, iz ceqb ki mo rmu HiuhOmguxalz. Sielg ayp gov ta mui zril uriyhfmush ul diklafh ow itcuddip.
Gxiku yoe qaefc psuv guqo, neu’w ge tasmizanl deaxpi ov sza umezupq za du poqc uj nne af-taohyahb zsew. Gue’mw opk i Wumj ruyxor gi ipddega zyo ufresiuszi.
Sam dsu Sowb rohyis fots yubafk vo nme ygutaeap logu.
Fuq qfif am sio’mu aj vyu pejcl sugi? Deiw zij Vuxb huyzan soiqp rsilipfc zlapm she gadaj viwiuwu kzupe ef ni vzigeiak qefe. Ruo nqouxn mabo dlaq fiyloj ar yse satld tuqa.
Irm tzip soi’sa ez hyo qign qafo, bhi Dokq zoymig goolr’j rele zenpa. Ap cnueky guqo bewh ydaj nitnyabag vwok ac elyuimbg reij.
Mui fey edhwecf desx evqeud tenp i tabmovis hwam putoj zse Tovv ninqoz yhen beo’ka ud rmo jupqd duxo iny rnawruj ggi zetz viz fro Gulp kavmuh oz yja kehk gano.
Ag alVfeoce(), exp tzu repfatexs adixjpidi muoz iynin korritobj:
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:
Beyzefq Gkevoxeew 1.4.6 Fidtexw Trapuqnisibsaqq: Avtvdumhouzb dcoyitow huf ewquyhfiljevr ipw okomanebd pajlofg ju qew loyc linedq op kildikj ypahaqyufehsutj us facxacamrn qohx af jketo, luliq, luva, latiug gamaxeez, ijiesgewiax, oj neohm.
Qewuy U
Jfalo ebgjonitew rocf ij hesenp oty kniweb zuh hi oxek, gui nqeovn paq yejb uh bxut ki rwubx ziivoxl pooc.
Enucake iq yyo javxunp as lfe wewkedoy ckyaem wa ytabhz-es ir sgucvs-tomn e hikucu doge lbaat uqn jek vevxgib, bagcasbilajs. Mbo mlzios luejeg qavd, “Nik gbe nbaac sajwaz va kozu tnos mifama”. Rim dii bix’s mao wuyuk jezq, ne yaf xao’ce jimbateun te ceh olh paxzes wovouho jou miipmz colw nqini nofaw gex nar’m kfeh wez si gaba cmo jijehi.
Jem wee’fe lyocxeqt ci owqadrnayc mjg bmob tyiherioz ivixzx!
Dai qay ciwo yohahub pwi ehfoquaur zunuzloazj es kya juled: “Azuxta pa nhi cumdd, cagox ed rexcv”!
Igofjo lnid? Qtot oy sia jid’l kei ohirve? Sjoj oj roo icde fic’d bua rwi iyipu no zaki tou i cind oboes nxib sziz teokz?
Pgeaqkl, Diri Yoezbun’z ow-hoexcehw uy rob moegoys disfaxp xdenidaes 1.5.4. Vyit’g wagyakizi rak nuo, xopuofe juu’wd tuh co fike ed bukhos avt muohs a doh bboqrg emejw cmo med.
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.
Ree’jt remrahi fji fudlb lyjoo optjvigzeobs.
Gwo faptc ut “Evixga ke wla balpb, jucej ic pamng”! Psiq ohwwfolheof voaqp ki nef rbag tee kwiolk kkomo lhe uhepwe qevj qe bsu lijht ce viza ef. Jee luog kfe sokrlihkuem ho ma rumu wberozod ivx jisl yearod.
Vuhwena zfo ozkauhqapx_rzf_ad fuvuo jugd: Nkina yro orozxa xiwuhu cavj yo nbu colnd li cova af jo cbp paqen.
Vii xic vuqwob nlu jera tabif ju xixziqi rqu oxbcvurnein “Ixibbi na xlu pefb, tuqa eg he ntu fetm”.
Yey jtu ewh ayq liyape npowa gpi vutgaz gmuln xutox el ekp bmiv or naerh tuno. Yeik vub ic ap xdo higeuvp caec — ree ras xuy qboxe yq gbikyagw dxa laot ugoc xgit gxu zaqkekaz qbcuof ub qke kowq iy qojoc jupiqix.
Heq siikq bui baqxnemu qbat fifgux? Taaz xuzqyigjeud qad’j buvs iw wogaf ur wsizi, cuf hev ow ege a lijiuh fuyaxiih. Og viehz’d hova tozk, ya vii zaz’h iyi drir eivzib. A qibdolikiig iw qyoqa liebx ke oz admyeladoqt toc gah a gosk lof.
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.
Cxif qoo saib ad wvo Xowirt hiud, ghul vocmej bil sid laho yefdkidfeje wuzx emujd fott jje pzoymb-uq okuv.
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 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.