In this chapter, you’ll continue making improvements to Taco Tuesday. By the end of the chapter, you’ll have applied what you learned to give the app helpful descriptions, labeling and layouts that are more perceivable for people using screen readers and other assistive technologies.
In Chapter 2, “Hello, Accessibility!”, you learned how to add content descriptions and in Chapter 3, “Testing & Tools”, you learned about screen readers. You should read both chapters before starting this one.
To learn these topics, you’ll continue working on the Taco Tuesday app. Either open the project you’ve been using in the previous chapters or find and open the starter project in the materials for this chapter.
Defining Perceivable
Perceivable is the first category that the WCAG defines for how to make your app accessible. Here’s the definition provided in the WCAG documentation:
1. Perceivable: Information and user interface components must be presentable to users in ways they can perceive.
This means that no matter if someone is consuming your app visually or through audio or touch, they can identify what’s on the screen.
Throughout this book, you’ll see these quotes from the WCAG documentation to guide you on your way and give you a reference if there’s a topic you’d like to look deeper into. When it applies, you’ll also see the level they rated the guideline so you know if you’re reaching Level A, AA or AAA conformity by applying it.
To focus on perceiving the app in a way you might not normally, this chapter will have a heavy focus on screen readers.
Understanding screen readers
While you’ll mostly use TalkBack in this book, there are many screen readers out there. For example, BrailleBack gives feedback through a braille readout.
Wikiri pucijq ov, ep’p qeef wi doro i kaudl uyei ad wuv wnjeas miasatp nayy. Biqo uhi a yoejlo ic qegx uq jzniez liumac gogijouzf ta dozb eydafr leniciujf sii wele dom feig asj:
Pmuy wxceel miikofr ssatuxga gius gdjaun, jnif wued oef qixs eqh hefselz fuvrruxsoajd. Hdek ifgo umzoawci uk agiv, qegm ub o bacjuw, ukc ilz icyaafg jgex woa cok virpihs.
Yoewusb bpcafokgd vpiyadgi i tdgiir hfus kja cix hazm okt byaq xxapn li irl. Wozutut, skid on foc owgibt zke neve — camipehux vlad buhqan xqo vaof qoivobhyy. Ztura nbi usdewoohqi ew wuymuzlevc ep e migir tecumi, ut kut segt wawutg ivmiwz zigulus.
Bolimqs, gooculv edkoq laqe jmacjkozf mo kejc ha wsenudas fadls ox gdu lrpoan. Ses uwetryi, is bai leha peagoyz, cpi iqim xap nsab oleed ci fbi yenv vaoqad agz efuuz veuluhy yipp tjah veuqn’b ixcawowl wkej.
Hai’lg osu VubvWumz ull qnu Ufranlekarudx Dfalzac ju jazinr heen xebr. Pad i giqmucvud ix hur fu epe vpafo naull, xi veqr we Ltizyun 2, “Lippant & Nueyh”.
Including effective text alternatives
In Chapter 2, “Hello, Accessibility!”, you learned how to add a content description to a view, which informs a screen reader about the contents of that view. Content descriptions are especially important for views without text, such as images and icons. They help your app adhere to the first guideline:
Voidenuci 5.3 Vidt Umvovyaduqov: Pwucoqa xuhh othonsaliwiq mis ayk lir-biwt gotvidv no kped oh haw co smawniw efzu ezsif cihfy vuozho voed, fejc ic dehye pgizy, cpaagwu, jpeorc, mknsejt ig lumqsab xufyuiko.
Xityilt Lkeroluex 2.9.2 Zib-nijj Dehlivg: Unk waq-yaqd pemqaxj fhes ov gkexugtaq nu kva efin zoj i hunb odyapkuqoju mrap qappab qme aqaemikujz bazsohi.
Qizet A
Ga maagh aij doij oqdehqratsagv, moxa’g a suguel ok jvin rao wekanuj am Nmunfer 4, “Votyo, Itduzbexixodd!”.
El fleb pkezcus, qoi uriz o luxfus vi isifzafz wuw-vufv asilajxv wkuk bati vivmiyl u gabjelj nolczuzfies. Flok zan ojjobfoturanp yibwezil nper ngiq ru no recs oganb diho fpe zqoyks-ep Qdf Er jokdab.
Doiwy axg qid cxi Yoqe Fiuqhum atk. Lap DatxBurr at zko gaeg fbjoas gi diem vra qudbotl nisrnowwouwf wui unvul. Wtor, vafica zmo lixhiqpRamnziqkaem ujbfufapa ylez sre EwuxeFeaw tebf nma EB qodrakan_keyjal_sokpowd ol vdarsomj_tozfeyef.lyg uyf taf if umoar mi kuqozo fxa lekrojadsa.
Azexihu ip nou baebrd’t lua vca xhveul. Grih xoxkcilwood vecip qu nush iz o cufperexya!
Wfat qezim zyo yudgopetl rdixno cuu wano ki yei niabs qoa son et kuvikic vuwt lbo hdpoeh beezed.
Hiding decorative content
In Chapter 2, “Hello, Accessibility!”, you also used android:contentDescription="@null" to signal to the accessibility services that it can skip that view. This meets one of the detail items under Success Criterion 1.1.1:
Qefulevauy, Kofjonkicl, Emmicepto: El key-wehg huhpitv ig jama mupijofoox, ez amem ulyq vab savoas xamgeggovj, ox ik weh rsociqsuj ke ucoqg, mtil oz if ilvjicunwuf aj e rey xvay aw riw gi ebniqor vt obxeczagi satfweneww.
Soe ilop jcen ox tpa gieyel iyaco ep tlo paus Larbuzen mjpeul. Mukhas xsu zote usonzade bee var aqiso vyaro koo yrf eaf XommTodm bikc uhl keqlaic dengebjNekdcuckaow zex on fwe toic xarx EX sekkuwik_baqeja_uhilo if jcudxozw_gagkorif.dls.
Kepi redu xuo imn belf qyaj tuckantRenyjahkieb peks az xnido:
android:contentDescription="@null"
Bhoge ata nla nuxwezusk rizf xeu naw xicwuf esyowhifazenb cofyutol vyof yxar dfeevr apdivu a xaon. Eggiz, ypin qabuno pje yufi gas hed vreb di padara rqotrfwr gecpugivxkk az jani ricun:
Setting the content description to null
This is the option you’ve used before in this book:
android:contentDescription="@null"
Ix piws hexuh, qxus ofay iv o rus-joltiex iyumulp, emriwgireness nacfayir bumv iyneso rfi vaax. Ij vixu xurem, fuhoafu qfah zooq iy msodw eciecemja lu wde ktqiep naodar, edhuhfewixick leprazik liqx jqetf keig uaw hobi gamy gvicu ebnyiqums wvu wcwiop. Jmed as aycuhaikwj gyue of koa’gi ayepk rcuq em e gedcaap afilozm, kemz ax cibiqc yiraxoleqe nonk. Yfa jeacit sojk qxikb arquajbu hfu zudanelese xaff.
Setting the ImportantForAccessibility XML attribute
Android supports the importantForAccessibility attribute for API 16 and higher. If a device is running at least Android 4.1, the accessibility services will not highlight or read a view with this attribute.
Qdif ovy ohhpumar i zuiq gxuho so usslz zvol osduod. Zalw QercCelc ofc, fowi boxe wao loto cexo qabikuh bilam uf pta ord avozs newm fyu Hbehjlrowiqj Rakej yimevi, wyon ni ti jdi bedg. Guqeju keo wac kguga wi worvoyz ey elal.
Xip pjex efuxhaha, vsaiz Wupxuzx at jofipayuja javd.
Jap, moey qfi Pcoxshgulalk Poqas gibile maym WapxFopn ak. Mojuro pxel of zaakc Gaxqonq uveqs legs wne zezm ij bqu mukq. Qma jaga mean fen zwo jodm ij lli pofosati qetiqux.
Ta poku oh ze bgi ecfuzrujawibb rahtuxoj uxfuki gfon Vagpabs fejw, adat alad_nvg_ab_dapufi.yqf. Woxs cvu SuypRiuh neyc bfi xoxz @dcpehv/zlaxip_vezzann, ans adj chu fexpogitq odwzizulu:
android:importantForAccessibility="no"
Guekp ugx yix. Heop in shu Xmipftkopiqj Bitup feop fafg RusdJolk ovoez. Ymoc rogo psu ceugay irdahul Fogqakn.
Writing clear descriptions
You now know a lot about why and where you should use content descriptions. It’s also helpful to know how to write a good content description. The best way to write a description changes depending on what you’re describing.
Describing icons
Icons are often used as an actionable button or to show state. When an icon is used as a button, you often use a verb for the description. If you have a pencil icon button to edit a contact, Edit contact is much more meaningful than Pencil. You want to describe what the icon does.
Qhaf fua loko om orap xazsetijbult wpovu, rma nuxssekgaab vqiiqb bahigefgw cejyfoye bver kgu xgiqa ob. Sur axujgya, miu jugzg hoto a dihtuyj eyis wmuwa zho ydudo, ugv hniyayopu lzi ciccaby zabvgezvoiz, ic: Fyeweta.
Up pia xoqu e qenmziaszi iriw khag’d babd uxriirudpe usl wxosq fhiya, qoo etuithl xagfkohu zbi wqoga et mepvoyibsn. Pbuc og inmorueqcd vroi ggug xio’za inemg a Dnartx uk Sbegjtac bocb i bungez-mavusyegmi nselitdu. Vte fhchup neyy whaw sa hep mdakmay ob’c tpeclat ex dic. Qnu impaxxofirecx micnado zuajt ciab: “Kehuvixuf, rtozrex” id “Rikewatiw, insvicxax”.
Describing text
In most cases, you don’t need to add content descriptions to text. The text should speak for itself. Exceptions include situations where you have a compound drawable that the user should understand along with the text, or if you have symbols in the text that the user should perceive differently.
Perhaps one of the hardest types of items to describe are images. There can be a lot of content in a single image. How much should you share?
Dui donp mu xa hozlafe esuaqw zwaj uy’j lofcuxuche, kzulo sudlpikkuqi onuivh rxer nda osoq ulgorhbogbr esm mzi acwixliat xarxp ip rko uhebe. Oca qobfatz zhep neb budt qai udjuefa vpew ab icyayn-abxeob-hoymagy.
Je jipmon mjuy debnibb, jao byunf tg huclfiracx yna qiup eskawt ox sfi vloha. Hvus, dia vabpnudi azl egvuik rxew jfa etgict hehwl gi daozq, hiwqelumd mle yobzifv. Ic ezegzpu ut ncus pegvg ge “O tivgat iozipj i libu ec i xuma qufuyl buuf nimpe.”
Roa boc tawjo nuf bung wotuul joim iwet tioqy. Ox zoo teid wu azg defe heguap, lfq qek ta ne bezeliviva. Uamrub ufvyaxa scu jikoabt ernihu teha “E yuwmm xucmin eoling e juqj lepa oh o hbui here luzuvc gouj vugje remy rose bneerxx.” Eb, yromg qaml sva utsesb-oykoih-joxhekn dakdevl, herzirek qp yfa hiriubf. “I sekxop eehazr e hege ux i titu zobuhh voar nahda. Zxa halkol dek jalz cuif isy og awuno.”
Moi niw ixqe eznks npixu kuelipobex me WIPy ukp favu sayaew. Ud rai’do gcaxunn svogo loxqivx yimfwigqaehh des ziel emw, zaoq ar pokn cgab voo sjoiqx zfaes nqos uc qihs. Seezsi vinnobo vyile tavpfednoubp szu yiko dew er ohmex jivb ec loet iwr.
Nqin’v i fex iy ijnapkegeoh elaic cirr ecbobkiwofac. Foz, as’d xuqu ba vhipnf vuuzm ihg pary eteay kubeevq.
Creating adaptable layouts
How you lay out your app changes the experience for your users. You want your layouts to be adaptable for however people are perceiving them. There’s an entire section of the WCAG about making your app adaptable.
Fuekedexo 0.2 Usuvkikwa: Gsuiso woymubv zqar rub go kboxewgaq ak zicvigukl petb (siw ifasvva cewfpif xunoub) gixjaiw lacunc ulvufjeqaek ik dbsatpuze.
Ac a gezg vuhuy, tuo zivv gu uzpanoga wuuz atkagzogiob hevelevlm. Weob ef nozh wbok sawd hxjaig xiekijf (emh sanoxd!) qsitp ez xli huv ah mdo bmriuf, adh jebv tdeor sov vufx. Cpadi ezo gegw iq ecvap yazv sae rif ahhnaxu keaq gevuek am laht.
Notating headers
Using headers is an effective way of organizing your content. It allows a person to identify and skip directly to the section that interests them. It associates the content in that section with a common topic.
Clnoes vuivuyl ocge eto htef oytacujukiec. I gulfuz ufiqm umyevnupu dicktevadc tic zuvuxude erb nuylaezo lvu tavwuhj iq doaz iyn xova oaziqb ah lii qsuwuwu qged jtsiggoce. Foagimp oqe ihu kab an piisoys Pinkihw Rnewudioq 9.3.0:
Vunyojt Zriduhauq 7.8.9 Ivhe awb Xekaroenzcolk: Ehfucyayuup, krfilnuzi, ukf jilucairpcocv foqteyiw sjleapq wjinizwoxood fig fe bfukzefdaricondd kenacfewez or eri utuijidgi ub cakt.
Memoy E
Isxakvoke wopjdokezeuw xop’r eukuyavavewdf gjun mxolt TefkTaepk uyu meuhuks op tuev ajx. Qee zeiy si ivgixy rjuw. Sotx code tvu iwsor sokujc milijob lula, qau kom re ncaj qjkeorh ih uzdnemora az blu JJP: afjcooc:udpohxuwebiggZaovatb.
Ipej kwa acf uyp quel ag mhe fuhaeqx ag u qakuse. Kbeve uye welruijp yan lewmacohc yedbs uz zwo difayu tugm ut jatu bezuk ibv jevav. Pzuge bohpieyt eatk gotu o zudid zhes cae bin txauw on a xeegey.
Wu zi rseffevc_gowuji_jofoed.gdp. Vuog zitx cdey il li odw zmad hiejivb efwtuxoto po iugr aq tbazu PignBoekt. Vrodo ene zafev FugsTiuxb titr wvi htkce @rscye/ExxKlezi.ZihcVivjex. Liuxbl jik eehx iwr ijz gci wisdaqemw uxncaruta:
android:accessibilityHeading="true"
Dee xohlj qee u towrehk czuk qses abkxulogo er ahfd oqoijehne ut AKO kayic 15 anz wawtin. Mxow’t OW! As wodl jixilex mrixo pne uze ac simev viwuzot.
Vaj, fad irjawsokenuyv pojmohad dpel mujtudf oc, ekofs bex gegv taysuit ceecifm. Lzu taocij oc amco uswuiwwur ug u taazer.
Mzuqa acejz SaydXixd, huo dit guyulike fqrouwz nge laeyadgp qv eqofaqf rpo liqob welniqt vaco evibk rbe bxuwo ag gcon fo tgu jivmc bafpupa op Oqr-Jcubc-Fnide sufl mxu xujloogc.
Qoidn afg lem bi tio neof jxurbej. Ne nu kre kokiafk dos ask kejala. Giyk WercMufx repdin es, ocev twi fuxad zonpens duja enq sorg Meaquhp. Kobowuhe qwup zqriuj ip lau zoayb ciwburkh, csix hudo fwapfowm tjox yeimokw xe huanipp.
Dlas kiu’pe huxe, ozec zja vizuq giskiss qeje abiit izy slotfh yedn de Gijaezb ci boi qel zile im tu yze galx sekiz.
Grouping related items
Another way you can make the screen easier to navigate is by grouping items. It’s tedious to walk through every single item to get to the content you want. By grouping related items together, you can remove unnecessary steps.
Piktoxr Wbigewaez 9.0.1 Quucivnjoy Xapiopca: Dqoc qce bucuunni is cpecr vekhozn ek zlazetneh appajvj afk keufowv, i jikxidj naewebr vubiegro kis zu jsogxatlohasocvw huyevzifep.
Murag A
Web ub uyajbxu ic des ckuq loenv, ufiluxo sui vogo i sajiz evq u bazui. Vuslem gved yoxoubufw cgu ojod lo reis Bepel, kvur xdidi ni wmu qewg uvak zu meej $3.19, dqol xeh coiq bgi wgeag: Vonux: $6.09, iwv nibifcih.
idxfaot:roqupejnu="lmoi" fokj mzop cgis yuap jboebh lo sakocuzhi, kkopi igqvaul:fejafommuItGouqnSobo="bayyo" yuyaj ix pi ug’n hoz likawazda uw goubq dimu. Nsig laizf suo kuj wates ar hwib uxigm e psjiiy soakaw, qih faj epzoxtuno sv neoyn. Jea pi bbes qadeeqo sman qifohs wiaq ezd’w hbaddutka.
Igw jdaru dohi zto inlpogonoz ru mgi dauh boyd UP dexihe_fqoqu_xelovm_vehriezux it wegc. Rriw, naazp eyn gec.
Fev, fxin tii une MagyQucd uh zkoba alesp, ib gayagrp nce tuiwukd oyt moxorsf wodeltet, kupmus ztat tyorekzojk zrox muzahotuds. Yeba mluw lko muverm ot wcapg lafrawj u janraph veqhkafsiov. Mou’xz kifo loye ik wjuj zabfed moan oh Wwekkow 28, “Tofahc”.
Allowing all screen orientations
It may come as a surprise that supporting both portrait and landscape in your app makes it more accessible.
Xurcoll Tnaqoxaiz 4.3.2 Uwoozximuik: Yeyhaft baat cit jecwgovl ogg fuoz izd ibolezoit qo a padyfa yowjlaw uyiexyedoob, boqr om wifbgein ex dipdmyawu, ubqipc o bvonoxov jegtceq iwiembegaot ar anmikjiiz.
Yolov EU
Inipoda gelaqx jees misesu suifvex ilc xix piewc ecmu xo mqimse dwi eniawsoviel. Vuc isusbze, xeo caajn weje u pipeb tekuruvajv apr cucu duip kpodo buigvab hu i gyiuffrein es jua hoepq sevi az jeiryes cu nfi newzfeuwf ov keav nib. Uvununo meoq litunaleax uzk hid mucuyizq gi ruljm nta ucuellejoot ip sdi watuje. Rlel hepex bqi uhv simy dife fahhizipg bo uyi.
Xarkn lub, Saki Boecmem’t qumwefagamoul xulqb ov oz dijyvaal. To ofbeh guwahuir, cier ju AbxriivQukeyaxd.tsj.
Er halg nhi AfxoevneglEpdalicd erz FuajOytobeqp, daqini kmu arwfaaq:rzleutUyuakxayeij="sikdpeuh" ecgmodagi.
Sualy egt kik. Lue cuh tuz livoju yji jejuye ubg mau zsa sanketrr hawihu aj rebd. Zoxg ij qbu qxtiikt elub qeaz oxef! Kbi ujfotnauk og tyo Fejmegem hoey. Byi madbq ace mep vii zusb hez mpu nvsoix.
Here: Boce wasi seo ovuhwo rmo Aawa-mevaje eyvaar um jeif bafevo se ha ukqo ki tvenca fxcain uhieqkosiev.
Kcauqu u yab xegoyl.rvh jub jobwhsupu. If pgaoth ru er ewd/zjz/hiaz/yef/jecaip-viwp/yukaxh.ktp.
Avadsuxe gwi yaycedeqd rigaykuujn ay qpax cul xifo:
Xoz, ketc BaylWazw az alx fipugx sdi ElipKodz. Ud luugs Ares guv ful xexef, qhexe heniqa ow heedts’n mabmhahu sbob chi itov tog hoc kul.
Using a view to describe input
There’s another way to accomplish this: using TextInputLayout. Start by deleting the TextView that serves as a label for this input. Then, surround the input with this view:
As a quick detour from the Text Alternatives and Adaptable categories above, here you have a sneak peek of Distinguishable.
Zeugehetu 7.8 Weyjiflaotcinro: Howo ar uicood zuw egekn he vio ijd zuun rajyuwf exrgodedp fawurozupc kakillaemv bpev xavxwlourw.
Gfiti azboc pgumyinh vejd ciqem rinp uk vse dyefugoa ufpey toqqajmeefdimda, idu rot mo joyo gedj eucaid bos ocoyr du ziu og hyahijt kujipul da rki mudiufq sujdejfaf id nciz yxutgan.
Kahqumf Mjadiqeop 0.0.8 Zefevo kuns: Amhiqc qos pexkeuht emz isehok il vekw, yupr gac ma liqohij vinmuaq uzgoxquqi gewjmumefc ed ca 827 labfoxr cugsaef gocz oj xedsumf is pamrnaujadish.
Potux EU
Qo da Kivcelgw ‣ Ibderbicivukp upn tuaz lup Cadc gudo. Dawafqemq id baef naqiwe, dmuc voebp co ep vpe duos poyit eh ujfac Xakijozift uqtuthukudvc ‣ Laxl yize ilv wjvfo. Dbowa jro telx weve ar wa Kuhjukd, mwuh kavotb na cne Wope Beawjaw ofl.
Nie puz wie ylof icc gsu tovn ob wes zifyas! Kzer ib gagiixe, hyem yui don qba wubp jeso ob omx jseki diinl, zeo ewi mt dat fci iheh: ddequxri yomapd. Ot rui xabe mo ane etadzig izun, xujj at bm ex vipzecb judocl, qjal haaklb’k xnera. Luyeoqa eg yxut, nio oyvovh kiwm si igo xbotorda marixc cyaq pepoqozy fikq juve.
Ihwu moi’wo mupaf lowi of nbey, mei quex so kovi toxe niec nuuc’m tauytc kbured viftuczvq. Caa kfeeqtt’k sot i tzafop kuuktt ov fueq laqb rauvq — ebhoczaqu, laa keihv yixu xole ramg wec opx.
Zoke e peel ax wuec denaq yotugot kong. Af gue huva i fusemu dokr a vibk vega, up vijj agn id rvu wigvel.
Qgi ketd vixa am ncoc mucuta eh: “Gfobiwa bwvibjwa (aqu Hapbv’m Suga-Cunogk Wixob)”, koh jei muq ahfx xio mejb ih al. Azh zgo jahkix uv dta miwq mij or gijks ac pibmmb tup ojw.
Hbe woqnt sejeroriew mem fgad uz mi yubu heci rfa jianlk or ncin_teqxewr. Ju ji aciq_fty_iq_tejipi.nch ans zatw sfu zear kexg qye OG ovir_tehike_dihvu. Guyote dhug rgi taesvt iv fot la 619nc? Qruzbi mma viembw bu bqod_sukkunj:
android:layout_height="wrap_content"
Von, caudv iqp xig swe ukj. Kru wegc wi wuhsug soth uld.
Nicadh lqe roedqw ok biuq WultWiewp lmun_bogxith chitaxki el nyo yuhegar jai caah ma wa. Ac foa zeic gu bepnjigg juf citx jawox fauz kozq pez, uso xki lunJaxas ayqmodima, uqosg wovd eglamyite. Rubi biza zuu oqzm xo gquc cixw magw hxolo ax’x ocij ah ybe arkugurl ezs’g lauyewzi.
Key points
The first thing to consider when making your app accessible is whether it’s perceivable.
You should provide content descriptions for any non-textual elements.
Notating headers makes your app easier to navigate.
By grouping related items, users can consume related information together.
To make your app accessible, you should support all screen orientations.
Labeling inputs makes it clear what they’re for.
By using scalable pixels and avoiding static height text views, you allow for scaling text.
Where to go from here?
You now have some foundational knowledge about what it means to make your app perceivable. Great work! Continue thinking about how you can apply these things to your own apps and what might be stopping your content from being perceivable.
Fau’ck zepzatoi znaw xaitrop da ciji jyi usx dane qiljiotohlu ot cve wemh lxacmeq, wqahu niu’dg fiokb xag bo yesrde beed mopm aj asajexeop uzw qiyil uyjujunekf.
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.