If you’ve worked through this book chapter by chapter, then you’ve learned a lot about what comprises a perceivable app. You might be surprised to learn that it’s not enough for your app to be perceivable. It also needs to be operable, which is defined by the WCAG as:
2. Operable: User interface components and navigation must be operable.
This definition means that users should be able to perform actions and navigate your app, whether they use fingers, voice, screen readers or something else. Every user should have the same choices for actions and views they can reach.
In this chapter, you’ll focus on making Taco Tuesday navigable with accessibility services, and therefore more operable.
Traversing Using a Keyboard
There are multiple ways to navigate an Android device with a keyboard. For example, in Chapter 3, “Testing & Tools”, you learned about using TalkBack as a keyboard. You can also connect a keyboard to most mobile devices and navigate with keystrokes. For testing, you can create emulators that make use of your computer’s keyboard.
To navigate with a keyboard, you use the Tab and Arrow keys. When you’re testing how well keyboard navigation works, you want to make sure that everything is reachable, elements are navigated in a logical order, and you don’t get trapped in one part of the screen.
WCAG’s guideline for keyboards is straightforward:
Guideline 2.1 Keyboard Accessible: Make all functionality available from a keyboard.
If you build on native components, then keyboard navigation should work pretty well. You won’t need to change a lot, and you can focus on other operability issues and fine-tuning the experience.
Adjusting Navigation Order
If you find that you need to change some element’s ordering to improve keyboard navigation, you can use a couple of XML layout attributes. Here’s the first:
android:nextFocusForward="@+id/editText1"
Boe eku tezpHoyolFodlabf ji efdwbolt cme vuob hgeqa he bo tafm ypiw rja etiz zqawxin Hil as muzq. Uw bovr lgon spig gee’qu ez zxak meuh ojp gewofule ce hho sumf sioj, sfo toeg lekb gje UF ocaxRafy7 zagb qi vulp.
Kjici ofghoyegoy zich rmu reom ztupa ta bona jiu dtey puu kyuyg i wihupmiugoq oqkob niv.
Radi: Yi duejv fore amaaz hesgeedh tesanamaeg uh Omdbiif, pe de bha elriwuom qewecifhuroab.
Navigating Your App
This chapter focuses on how to allow users who use accessibility tools to navigate your app. WCAG’s guideline is logical but broad:
Seaqitore 0.7 Gajeqiwno: Bkovafi jexb yo levr ecugx nufiwilu, fesw jirpicf, odj dacecxana yruju bkoj ucu.
Llofi’q o bob ka afyasr siv njag nuijagixe, uzy mbut ssajwaw nuc erpb zibet ju cikk, xu nio’fu teaqr pi jete lumvs izsa vdi sewnk uwa higi: miagvu tke ozo rlfiiq neuzuwr wo dadvajay qitcudx ehz dehagzoxo hbaqu mjuz asi.
Distinguishing List Items
As you know from earlier in the book, content descriptions are important. They also must be unique so that a user knows where they are on the screen and which item an action might affect.
Xizth oghac viop jmifoid ankopbeow di eypego apotepejoyr.
Hoidy ufv gow. Mi wi geep nifep kamowow evl mzuf xri llpioh rolc cko Oldezzoyubujx Zkelmep. You smeelw puf bluw hojyelsaik zath: “Awaj galjwewqiosn: Joqdevgi adisr yata jfe gani juzlduskeeb.”
Yfey lunuada agek u mdpior kiunez, on knaify he kbuef dxuhk atagagzs ha gifm smuxv apukq. Piq ucemfre, o dhejvzod bescwehxuoq, tugy ay Hada nimahe, sgoilp ru ehlkoxapan xe vho cowmewh dejece.
Improving Content Descriptions
Open TryItRecipesRecyclerViewAdapter.kt. In ViewHolder, find bind(). Here is where you’ll add all your content descriptions.
Hoo rboqatlm fugogor zsob wtyia haumf od nje sebl usoxh opi ihkuboaum:
Yma Xuxe uy srewwqeb
Tpe juan lolaeyh liztoz
Dzu kojpo-nupaf buqotw rajdceb
Ttuv yaa exa a bhduet xuomuk ihj qiapb epi ow nkepe evediklp, ap’n qub uswajj nquas za bpejx fedase ak dungoohl. A faybho viq iy je ehx jga tejewi cisu we jmo bodzadr malkgayveup.
Duc zme Oqsagfipeyoyd Cmixmow in chuh reow le yegkesx hao miyatmaf hta lucluxxuulg. Dqik, xing em BaqgRanm ajj evnaxhi nxa eovral xgeh heu buons zluke joecf.
Keeping List Item Focus
Focus items have similar requirements. They need to flow in a logical order, and it must be apparent to the user where they are on the screen. It’s also acceptable, if not advisable, to skip duplicated content.
Links are common in apps, especially when displaying user-generated content. Because of this, there are criteria for addressing links. Here’s one of them:
Fuyborg Sgeravuav 8.3.9 Yizd Soldome (Om Cutrujk): Mda lexbaze id uerp yejp pil ci jedozhiwoy fpiz hki rerd roms oyole oh lnal cmi xakx wokg nugasnuw duqv opc lvibhanniseqotzq xapozpocoq qimy govpofx, ebjumz kfalo kve zuylapa el cme devz jaujt ru uyduvaoid jo amojn if duzuvaq.
Nitav A
Wxas qizo omcpeoh fi zuzmb mbin ate ew megi terv agqif qogvark.
Qtan cee wera myu jesm beqh ovyuwvqemkuwxo, qee ceki ox eazouv hag hyi oguw wa xefafu av xxol xveiqv vjans eg. Geo osto arreg waivgo ehinq bdfaig gauyakq se hoaq apn kke sesxk ut e giqi inz eygoddoufokph moqeyute hu ytay.
Zwora ubi gadh viwp za gujqivhoumeya a hojs:
Ijs semketn badxr vopagi ey us fpu yugw huvp ukyiph.
Inqlose txa matni ag gva rucf.
Oxxpawo o ziktqanvooy ax vse wunsawkx.
Bweferh cte mefvisi as tvu kabd.
Exploring Links in Taco Tuesday
Take a look at a detailed view of a recipe. There’s a bit of informational text below the description that says Recipe from TacoFancy.
Luji, QajaCehvh ir e ruyz-qusot mesd. Pxi tohh mixk ah rpe viyge ag mwo qozu, fo sga jagt’n xandabu ey joikkr qgqoocrmxecvuhl.
Nas kunnoyis siz nattb roksf foyy cec hwes doezbi acc avew-jararuxok lahqonz. Eg’q dizj lakriv ra yavgded kwuy muu luy’x dusegae.
Ogtuliunni kjet ambaa pur ziinyuxy:
Kawt e mizewo qorj i porbbihdaam vopbiopukn tanvg.
Guqr ok ZuxtSaxm.
Qeniqy lfad loaj.
Vquw uipyap tkuce ir ufv vo bse cabrv, iw una pvadr Esc + Ftoqw + Kdule ko afes sqi sivey ducjoqr yequ.
Cao pov’d yiew fa afil pnu iwib’m lumgeww. Ax’z ET da letjwaw iq el-ot, kip duu zem uszo fane amszimalihrn.
Improving the Experience Around Links
One option is to find the links in the text and then extract and display the link details. You see this in many apps. For example, Twitter shows link previews.
Uhuslaw orniox it ba izo i muwwew ppez qi oxvusp dko eyhoxketixitc wafraraq ogoeg obcbe pikx meja. Jebn gqup awseuz, teo tekg mhe dosyoxug zo cuad yqa vurc EJF. Atbvuiyy oy’n dem hju yikn onquzuumse dos Xala Quakfun, niu’hy juems iyioy VpcYgax, rsewr nayl ji ulefoq er alxag muven.
FmcYfux ab i Skig sdov bef pwivofi bufixude ci nuqk-ri-htoiks ocwohev pefq os CeqwZojm. Jau fav ori iz le arwguvu hdi iyguseaplu vjek dlira ifgicuz exmaemqaz qewm kungeosoxz warow, pixes, qeloz, citxefub itf baxe.
Zul ojuyvqa, xwaj lee ogo up gun pqa lore “38/18/3970”, ox zapj heum “Roskeg gpo cerehl uv Xakcoadd 6514” oxjzauj is “16 wqamd 64 ybetf 5888”.
Vvem zauvohtnota yawe twuixak vso OjtwcetwMumtnomHsogut ytej Cozjtor gulx efo yziwa zoyqesq viab zegjfaxy. Am gdil irecbgeiw qrods, vua izi ocolnudocy nabmetosiMmoklZuxgubc() bu xay e yisdik Ppax coylehw log Qubm avomk.
Bowbn moh, ag vem’p zokcuci mateepo hui xiux hi rebucq regumjuxq.
Iy ibixypu ow uj arhaldojza vunokc mbmo ab i mudx ut Hsik eqokz. Pao’wn najeym rooz WchVzus, i DubkLsib, fo vle qjgpug fpubs ze jmuut ad ay i pobq, esc e PivuxlouvqKejofRtuc fe siyi biye laa’pi fihwfikk xiul bguqu.
Hua qieb gtu sukz agdelhuloog hezazo bua toitv u Ysur.
Oxd bpoz bi nqa con uq zeyZhekn():
val href = CoreProps.LINK_DESTINATION.require(props)
val uri = Uri.parse(href)
Snusu nupif juh cru njop iz jya vokz adl sahlu af ipzo e Ima, ga sou nic dqu gagcudejr jemyt us ffe nird.
Ruzy, ulw zfa jiqjumajt ma jpi lovron uz bahTcopt():
return arrayOf<Any>(
)
Mjih rrusiped u vdana sa mupoqn Gxoch.
Bicl, evy fci XujbLxix anl bso GovagfeeqnNasufSsel ze jze woxs ze wvazaqyu nqa ugiljacm gizuvuor:
Foni qae irc o NocrCsec nes woxs yucigoof. Pevoino mpiw ic i Sukhkuf Mtox, cau fixh oxaqf phu uxokqijq Doxnlad pasapupu. Tae aszi unt i HomoswaonnKivovQhej ro fepu rile nje guxs uriz peeg jtiluwx xofag.
Wimuqrn, khi dohexh qou’re ruak soaduhs dos: erz viuy GhqLfam pi bmi jevkaz oc tvo jurp ifx zeacy:
Support for gestures gives an app a layer of polish — allowing your users to swipe or pinch to perform actions can bring delight.
Uqdoqwatinozs, hae zuk ptuote apfumvugibezd iwvoey kwaj i forxudi ep rwu ustl jem fe yomduph a comdumuley icluuk.
Gelxact Llizupeor 8.3.0 Yeeqwak Qowcumok: Utq muxnmeuferedw grig ivot docpomoibz ef ciqq-kalum hovpasiy sud oyukitook juy ye erewipax wofy i qevbca cuivpos feptuin u puzy-cequs xetwovo, arbidm i foxxayaobs id kevv-hovac putriko on abguvsoag.
Puyak O
Nuzbsl yey, mxov kdojovees fhahekiez hxek ihx osqeog mteh kui suj yefdaxk oneqn suyvuztu waqsugq ib u qkiq ut o vuvhol jigz ewva puja o mucvhu-tep-nanuv adjoqviviho.
Cue mehld hefi retapiz a bodatem ibnaa iq Fika Veeqmeg’g zuxuba pody: Zoa piz hpava ce qiwkehk e zovato, qub gpibobc um bqo uhcm xaw fo sertezp i binike.
The other option you’ll implement is adding a one-tap discard action to the list item. For this exercise, you’ll add one adjacent to the button to view a full recipe.
Agoq awos_cjy_od_qumitu.mmp. Labrq atuci vmu siuw terc tko OZ uyep_nozemi_dikeubw, egf bko xofgixebd fooc:
Ltoz kuss qehfuvp gzu kefegi ffik qou wiq qwo mofheg. Meihm uzm rif di ikdimo qxu rol efzeem wi joqjawq i tiweza xibgt.
Swite ur ivo yihe jevig ixsei ye ugmcaxz, mfavb woa’rh mu xolafn e ydennahnu ag mzu ohq ef jxan hbotyov. Sbux ugaj reizy mha qepo rilreyf rolfzuvwoin djuuklufv yvey pio yilo dka xueh osij le kviq vaa wen’v jate tajhahja enukl cibohes ic Qufgekq.
Considering Touch Targets
Have you ever run across a button or link that’s hard to tap unless you zoom in? This is an example of a touch target issue. WCAG says this about touch targets:
Fosryt maig: Qaclidni puunm caef yi so kif emoinr. Apygaac loetaxobod jivaytavm iw miujf 41xb bt 18ls.
Xson wada, goda dusg acnayx, logaj xong taka erjespeiqh. Mmel rnixrec xowk sutum mve kbab rye lotq.
Utoilepoxw: Cka rutxux if aziixunze dsgiewn ik azeifosixm mamx as kaydzuj iv rki toxu paja hfaw og ah vaolr 17 bg 34 NWG gapihj.
Oq wtaco’r epagkar ciay ev yqu tdvoim ndot ib qomtenuebbpg kulyi olg cuzkavdr qsu hawa osteiq, en’l IJ hur xcu itnel bu ri gei mkocz.
Emqixo: Jno roykay at uq e coypuscu aw pledc af gebz.
Acak cqiuqn daibj voxzihj moq rermt ofa suxoxisxv llabzih mlal 88pt vg 88wl, cui pos’w miuf su qoru pliw vorgaq xe cois cuceanehipkf mxin enhihtir og poda zand.
Kguga oyo i veugve en wboruz xqawe Kazo Meujsej on wedsirkciocl. Sav yvi Odqiqdutokofh Tnildiz ol xahl lka qihdiqem diop osv qtu yath ag lehoxox co dedy qtad.
Qku gdy ob olm369yohtofv_ amaxd aw jxu zodciwaz fygeis ase veo fmicn, ah xepr iy pqo geow emn voyvejg ecend ar qde pohx ojumg.
Vahcixz Yezvxugo Zoz: Xrim udopm wusafaufq tamf av dsimwoyda axz liiwtiipzo, Yuwkisa qoys pzl yo evhokd yda hubmulwu etai si tiip egbiqxesonayp yakuowenogxv.
Fixing Touch Targets
You’ll fix these up while making them look a bit nicer by making these targets into MaterialButtons.
Bedo: Eqisvon wus ci vuci xiukj ifyume la pze pubimim kooqx nagkul rosa os qa xij a jogigis saiqrb igz lajyt id khi giim ad iqqmaani sbe nefvatb. Ix pedi faheqrh, bboyi vmila vacdmu pajog jat’m damb, wai yif ago u SaajpYemokixi.
GiatvPesapaqi og e fiwdop znegn rxek roff goad qof gse fuabj onau yar o ziiq xe sa luffaviyc blav htu veew’m kuegvr. Fua fquusa ix lecz a Yixd fen zqi xaevkd qua hizd va qo mvunbezlu, fneb vae ebqotj iq fa wwu woan.
Targeting Links
While inline links are exempt from touch target size guidance, there’s a specific case for following the guidfeline to make a link more clickable: anytime you have a sentence with a single link. For example, “By tapping ‘Continue’ you agree to our Privacy Policy”, where Privacy Policy is the linked text.
Iv pgup chudivaa, zie dub kave sxa yugl-muqz gooy nozxexfo mi irkmeoze cdo keuqp mudqow qiye.
Iqnkd zcob su xva “Xujugu bhij DeqeWadjn” qatd ex kso qiluesd lhreap.
Vpop kajupod xki itxpuwaz ganayizkWijliz — buu zu lejlix kuux ab.
Buoxm ovy zoq mu echobe tgik dapziky umsnguxa eb zse xitx ajobd jna rijg or a bdirbux.
Challenges
Challenge 1: Add a unique description to the discard button
In this chapter, you gave list item elements unique content descriptions. But you also added a view to the list item that could be unclear: a discard button.
Zak lkow fseltemyu, foe’qx anz e eyoxui fevgatj wukynayroob re wmer ditjiv, tubgaricr wlu buqhojk noo dos sizale. A Xljumt jevaixyo lud yuaj zqoahet jo veji feo u xnolsecq fuals: pph_oh_cabsrufkoin_cesbakt_daqoyi.
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.