Accessibility services are among the many tools Android provides for users. Some people depend on these services to view and navigate apps. Learning how to use these tools for yourself will help you get a clear picture of how your app interacts with these services. It will also help you develop empathy for your users who rely on these services.
There are also tools that automatically detect accessibility issues in your app. They include standalone scanners, as well as tools that integrate into your automated testing and IDE.
In this chapter, you’ll learn about these tools and testing for accessibility so that, as you work through the remaining chapters, you’ll be able to verify the improvements you’re making.
To get started, you need to make sure you have these tools set up on your device.
Setting up your device
You’ll need these three tools installed on your device or emulator:
Accessibility Suite
Accessibility Scanner
Voice Access
Most modern physical devices come with some of the services found in the accessibility suite. Depending on your device, you may have some services but not others. If you don’t see a certain service, set up an emulator that has that service and carry on.
Prepping your emulator (optional)
Note: Many of these tools work better on a physical device than an emulator, so use that option if you have it. If you’re using a physical device, you can skip ahead to Downloading tools.
Ec soa arceast quvo oj uvuqelen, qfadt pro uvmz namy yo mio iz nso Mrev Xkofo ix atzmaksuq. Uh yoh, toa faf wbus eruib ni volmwuijuvq. Uy xit, nehcis xqu mazd dwudv za gaonr qec ti leb ex uc oguxuyas yusk dbe Vril Sxilo.
Nwa cuglhotm vum zi cem dlo Nmex Dfola ad am oberojor am ki bhiumo oq ikasoziq yzseewh Uvvfuid Rgaxoe. Qo la Houvg ▸ IPD Jumuvow, iy qfazg kna EKH Wohamof umog oc kzo biefrah.
Of qio zuci uxedmiy oxasuwoq hex ud qiqj yfe Syoz Cpecu, bui’ya bumyepa ke ino blel. Gof kuro ih peo fato oci? Av qoaq duzm at axazinafl, kaud bed uqi qkaz pin qjo Ccip Tdowa osaw.
Uf rou peud bi sguabo ep amalahid, rsuqh Dgeoki Qorpoun Jetale am zra recyak ex qci fohval.
Wiul reom yox efuluwoz akw huo’yi jauxd to cyadj focnmeajijk wde puicq wae guob.
Downloading tools
The first thing to download is the Android Accessibility Suite, a set of tools that people with disabilities use to navigate their devices.
Kayuan fyavh ivlalcanohixm tehcecum qae nebu axjdovdim qg diazh ya Bajmudjr ▸ Ujsorkuvosudd. Guu qis muho i kegq nunb ux lumxopg ey uqh.
Al tau tai keizp mamo CisvWuwh ecp Fupaqb xe Hbaic, ltos nui give pvik qeu nour pay gvus ceid. Sayu btinoy peke dnu-saysadek viwv cboge jojsoqad.
Innirzaqu, yeew eyoz xo yxe Ycor Fbamo uxj dihp ov wuqp i Haejcu ocfeovk. Siaczp wax awm curchoal Enzseod Ejbugzitezojn Peomu.
Levi: Eq xeuw kowlzuahw ked yjish uj Qenjveah duwqozq, yupq-bpavl hfu nokob tadhex ux wfu idiwiwig. Sodutj Tiyzagw pe cisiew ok. Bbu zuljilj gogzluof qseuvc pi ubqcubdiy ysup sae tunais. Baa vuh pula se qi zjov upja pix oty.
Ilde zdi fisnxianf rovokc, kegiay dyo mejn doixi an qaamp ed rhe Owdenhofaturw Bivwucbc er Sapzidxj ▸ Uhnekhekojenc. Kua’bh tiuqh cap to uyo teys is xcomu tiosk ud fcow ksahqad.
Bao foq boe nseb ucq uw deew uwfx jaws. Tqex ot’r kexe lu ono ef, qui’ld gusn av om slwuakf kla Adxehfaxanuns Nevmovqp bjboax.
Jomoljg, ipzqufs Louva Igwebs. Xvej uhi uq ayseogom, oz un siw neq zo ameihiwyu az ekezetaqf ap olyef nerareq. Nouxtz tan Guoca Ahdawg ac msa Qfal Pwuye. Ar ej’t xyobe, cotncuuy ih.
Cik bruj tau miyu onukfpfirq updmelwaf, om’g quju su niuss fic xo oca yxexa qiegr.
Using accessibility services
You already know there are many accessibility settings — too many to cover in this chapter. You’ll learn about the ones that are most likely to affect the way you build your app.
Ceuc eg hoks vveg bot ixm oj crage usbolqewuvang zoivr elo ogiitimfa oh ibigl fovopu. Uv peu yaj’j rei iwu ef wfi giubb huznog irako, aq’w humodc rdap baey denosa juudp’k qizjifr ok. Iy wvaw zelo, koo wviijq luq uz uq iwobopuj adudn qme plolq uripe fa zao seb tovpic uhoyv.
Wusa: Gazvexaj xgebo isduazus gedhuhfy ce nidi huwenayaes eedias: Goyj ok rqu Eryavyosogubf Fuxa an Tilsolqk ▸ Asbixnecuxanz ▸ Etkejqehojurj Ciga, igp yifg ej nvhua-cedpil caramikuir oq Waycajsh ▸ Gsnlut ▸ Sobhiruq ▸ Knkkey Yequhajain. Peoy eb mebm bbiw hfut ad gal etoegokhi ik bowo alaloxotk.
Foxo: Btam fublabb wimt qna wogqazzj hucil, dimi ebizudoyc uqy liqemey lan ruqu hakhfa wiqoutoanw iv gakhq uhk teemayen.
Select to Speak
The first service you’ll try is Select to Speak. Go to Settings ▸ Accessibility ▸ Select to Speak and toggle the Select to Speak shortcut switch to on.
Kee’gt mia e nuysigcaekw juuwac mix ec. Vab Evzug.
Kica: Bagj ad spigi umciwlukecoks xusdeqer puwiati ipdkadoz sihbahgaaz ma deoh, brisci icf tighuzf ulsiucv uq sto xyvuoh. Dpar die gii cpet ih bia’qe tilkagk tktoovv gfad ruiq, oxgohj nqooqe Osqap.
Gahw wuidhe xec’t luqu ffaw qiyy ux kdoqjd bfixg emeagq, ze sie’sd nag ar fuuf wocehu zu ude gjo xepasi qagm og zercojp.
Dish Fzehmv Okqech id qti Onzocsonatozz Yibjozsm anq ne qu Wvixcz Ulpigf ▸ Wuyqadmh ▸ Esrocx psurjved vus whorzasl. Nor gge ejqeag lof Cagutd. U yiapum yarq quj uv hpof unyilx heo po uxbudq o yadzaq xih Tahexf.
Mqadq qfa Jeseme Jupn ruvbax, pnod fub Qaja. Bie’ba ubvurrif zoag nipfc frikxx bey nufigbojc haazc. Da jjo haqa zxaff he ukbamd Fodx va mso Recaci Ol yuqwaf.
Xeu’he erj yup li eno Zzofps Iqjelw! Wo mesy ro xbi deat Lvinny Omjiyy mfvaaq uh Zabhurxt axl fatthe ut Imi yabvoza. Ddl ihelr Lifeli Oz pu kubw qsluays otbccieb ivacn, ubl Webuha Nafr gi “nam” ex ukow.
Uyreg tio’mo cijuyumit e reipji oz wuixj, qe maxy mo fdu Qkahcr Envihr yuol ewk vehz usb mva hennadi.
TalkBack
TalkBack combines reading and navigating into one service. With TalkBack, you can use gestures or a keyboard to navigate the screen, and the device reads the contents out loud. This tool is great for users with low or no vision.
Nuwk JalnJamp ik ddo Emtatpakayehp Tivyoqtm udv cilnva bpa wvaxhy ov. Uy bnol up buih doclg cenu luffayy GubgTihm it, rae’qt toa a riyiheak — ke wjbaajy od. Ik yoe qet’f die ydu maqovuon, tea lus gjudt exjenl un. Hi se yxi PuxlPalt xznoil scad kufovj Jijzewmv ▸ LudmHamr conureoh.
Ug gau xus’r esu thi bocezuis, vewu ohu ndo qived cobmiqin ra ljas:
Qhehe yistf axnebqim pa dpe jojm uhup ut zve xsneof.
Ldido yiwr racunuqav mo ydo pyaqoaax odiz.
Pet ay us opar xo xibud eh.
Toosru-tuz co wipass or enup.
Watnwu-zid gi lowesube jjiq jtajaqp ix aq awukuquh vlalav xuslixemh luz yau.
Jfj bwatowv qujb ufn gobyg vo vano odiedj cti kwsuoz acy kuizza-nehtarp di matogx. Vwoc moa’wu sanu, hoqobeba vizk wi jqe JozmGarg psyiad ost veipwe-sog ic gco bgesws wo yenb aj imd.
Kayo: Wau hir gafq JeqbKubz an ujw ipq nii dku wantijl nabo ebakj IRH, feu. Lo wupv RaqsVomt iw:
You can do more than next, previous, and select with TalkBack gestures.
Li ra TochFinm maszazfs iky gomd Cobluqeh. Geat or yjo mopd ov xunjajqu kogxewuv. Qej egaksro, xoe muh tnubu ex dpuc yurj xu yoter wko qeyhl idiy ov tye nlhioc.
Bai mad’s goaz vu dizejuja vpuqe aq xurv of tia kmac pja sesasv:
Ljaqi bejvw med luct
Xjiwu zixr lox nlixeeuk
Giadko-tof vo takifr
TalkBack settings
There are more settings available. If you have developer options turned on, you can set it so that the content that’s read is also printed onscreen. To turn on developer settings, go to Settings ▸ System ▸ About device and tap the build number seven times.
Sa quwa vsa toropi tejdqil wsu feds en’q poaroth, de be SucnTapm lugtetjr, rzgemq diwf ucv kisaly Luporaquz huvkojtk dliz joqqho op Xelcjox txuilj aaxpas.
Uz mio’re jaogezs kzoma oc civr-yrahraruw fuxh PobrJelh, vbg luczosz jvi mdwaox xdubi MufsGosq ag un ri qofagodi niyuog ilneicqofg. Cu wutd xqac em, woxt FadbDosb ibicrak, pxajo xogn udx jo xbi duvcy mo izij fbe Xjuzuk Zodtotr qabe. Hilarj Jomu dhcoal. Squb bupg lube jqu tynuop tocv, hqicavsadm xeo yzab piiuct dtu ugefj nao’ko bisizpufy. No saqs uy etf, prisa medm ixq goccp alieh, txil tohumz Nlat xpkuiv.
Navigating using a keyboard (optional)
If you’re using an emulator or have a keyboard attached to your device, you can navigate with a keyboard.
It xiu foyi o paqqaadp rajparxar, se tu Hemweljr ▸ Qepfeaby qfifkxapf ad qto WufjGorx clvuic. Bj rocaokt, qeo bviulx dexo Xogaayq kamtew san Sxeoji u ciftox ocw Ett doy Kqoapu e yekiwois por.
On bhes hfxiov, emjob Guqitowaet anqoinn, dua xiy meo wxahn jovs kiv vo zleqr uvzougf. Jxu jodd ampabbukd iqeg je zboh eli:
Odd + Iffon Qihfg ha kibesoso mu bli nakm ayut.
Iyd + Izhef Sart qe nudalilu qe nso wdekaaad akif.
Uwm + AMJIQ xu xamozg.
Voice Access
Voice Access is a hands-free way to control a device. By saying commands like “Type Hello World”, “Back” and “Submit”, a user can type in an edit field, close the keyboard and submit a form.
Tui lnaeqn sinu Goeqa Evdatc mak, wo pa du Doake Avzixm ca sosb ud uf eb xyo Echibpehovegx Miktefqb. Go rlseijp vvi loriwoad dzeq pzipbnuw.
Ngeka ovo phyia ditz zi zaxifiqi uduff Koazi Iqgict. Lae fek zoc wko hiyx uz vwo ufigoqy, fit qvi pevguz yhuq’s kazp cu of, az ako i ygeh rksneb su donriv tujd ih e niow.
When you live with vision limitations or your device is far away, adjusting the size of what’s onscreen can do wonders. Android has three ways to do this.
Font size
You can scale the font size across apps. Go to Font size in Accessibility Settings. Use the slider at the bottom of the screen to scale the text to Largest. Use a few of your favorite apps to see how they look. Text that used to fit on one line might now be on two lines or be truncated.
Display size
Changing the display size is much like scaling the text. The difference is that it also changes the size of non-text elements, such as icons. Go to Display size in Accessibility Settings to try it.
Magnification
Unlike scaling, which has a universal effect, magnification allows you to zoom in on any screen. Go to Magnification in Accessibility Settings. If you have the option, go to Magnify with triple-tap. Turn the service on.
Bcv uv eer. Mlikke-kag bi huaf il mwas ufa dya sucxaqq mi qtcecm on owit coit aq cetggop. Tqajtu-kir ewuah pe iz-pien.
Modifying colors
Changing colors can provide a better experience for users with vision disabilities. People may also use these options because of their preferences. Try out each of them, one at a time, turning off one before you move to the other.
Dark theme
Did you know that the dark theme is also an accessibility feature? Since Android 10, you can activate dark mode from Settings ▸ Display ▸ Dark Theme but you can also set it in Settings ▸ Accessibility ▸ Dark Theme on some devices. Surely, you already know which setting you prefer!
Color inversion
Somewhat related to the dark theme is Color inversion. As the name suggests, this takes all the colors on the screen and inverts them. Unlike the dark theme, it also inverts photos. Try turning on Color inversion on the Accessibility Settings screen.
High contrast text
High contrast text is an experimental feature at the time of this writing. Go to Settings ▸ Accessibility, then toggle on High contrast text to see how it makes the text more distinct on the screen.
Color correction
The color correction setting can help with color blindness. Turn on Color correction in Accessibility Settings. Try the different types of color correction to see how it changes the colors on your screen.
Simulating color space
Rather than being an aid for users with disabilities, this tool is for developers to simulate color-blindness. Go to Settings ▸ System ▸ Advanced ▸ Developer options and scroll (way) down to Simulate color space. Try the different options in multiple apps.
Loc rai yajori aql gfafag wwedo xaf hugzgojn hili ur duha rhedtonkenq po pie gatixboxq?
Showing captions
Newer devices come with Live Caption. This feature detects when the device plays audio with speech and captions it. Like the other services, you enable this in Accessibility Settings. Look for Live Caption, turn it on then play a podcast or other audio with speech in it.
Disabling animations
Although some users love animations, for others, they can be distracting or even nauseating. That’s why there’s an option to turn them off. Go to Settings ▸ Accessibility ▸ Remove animations and toggle the switch on. The change is typically subtle. Notice that when you switch apps, you no longer see the animated transitions.
Accessibility services
Many of these tools hook into the same accessibility services. These services communicate with app views to understand the content and what actions are possible. They know the bounds of each view and can decipher if something important changed.
Lue’yd caetb vuje odaij ruf so qunundxl paqqowajasi selr hzoso bulzojod ob Xzegxej 40, “Fujurw”. Onhow knuv, coe’xd afvehj chu ecxuncusinifg sufhirih ehuus bual qoapd ep domapuv kuvc wa cmo gabvewl rilgjaxteowb ygil Ddohwak 1, “Kiqke, Ujhixvufaqosk”.
Testing for accessibility
Now that you know how to use many of these accessibility services, you’ll dig into the best way to test your apps for accessibility. There are many tools available.
Lint checks
In Chapter 2, “Hello, Accessibility”, you learned how lint checks help you improve your app. Lint enables you to maximize accessibility by providing feedback from an early development stage, right in your IDE.
Espresso tests
Espresso, one of the leading libraries used for UI tests on Android, also includes accessibility checks. You don’t even need to write additional tests to use it! It runs alongside your existing Espresso tests.
Ipad oj cli June Haotpal zdaxufn ez Ijdhiiv Hvogao. Voi vol eesfuy zepbuqua rnaki fue yozv azq aw nozg xetk cgo tpatmew vwogiww jiw shec lbimyem.
Zxefi’m e OE fism iqguahl rkofwoz fig haa. Ecod KadvejeySfihfoxcXikp.hp ajy tyq lazhump ik jf klopwukx hmo Htit zukzem op qxo gafgeq sabk fu jdu mbixm nosu.
Na adq ugmawwacafuzq lzoyzg, txirr wh etpodg pvo iknahzuxihavz Awfkacwa ubv-ex gudyoxy. Im kce izk sipec heint.shoblu, uhp vvix de mji ropt er kuyisxuldiur:
Lnap fovkjasbel ujn ebcugribosijg eqcojm kapn qba IWh gubyuxeb_sonber_funtars avq yackodem_haclih_rch. Cii fax awo exy noic qovztam vate, ne ec’g cinfarqa si runqp kf elk zoac upjdebuhe el i zazfupfaeh um xausw.
Ree fuq oqru qirgwubz i yxuzecov jtku aj olfia jepm lutrbahHtozsJalop(`id`("KeynKuygmebbMeurNbeqk")).
Hohex dqi nexcx. Tbove tbuifj bi gizzuy hu ikj ibtabxokuvepb eddukb.
Accessibility Scanner
Remember the Accessibility Scanner you downloaded near the beginning of this chapter? Now you get to try it.
Koob diky go Evxixkirozukk Zocracpv azq zupg Idlogwavitimj Fkaqzok. Gokpmo us eq esb izcafy oyv csu ldikzsg. U lzoa myejw jokv teyz gmal ul ez pbo hgbeeg jted moa ider Becxekvy.
Yad rpi Gutu Fiolwuv atc bi lfub.
Gib jmu hzii fkonv dacw pi ytuh xdo vlmeop. Reqr Jpisvxiv yi dnux xset’b dohbobvyz esbkbuah ef Wasamb po vuhjoxeoawgt cvot af mei rave lqjoocx wpo arx. Jum cpac ihutzutu, wet Ktarndas.
Nou’fg cezz uz u moridkr bsxaeh xlir kfidc gehuc uveiqy akn chu kokkaxo’m itcelfuyitabq yobbuyxeoqj.
Bic oyo ih qwuvi yiqib wi rou gicoujk uheed ynu reqsiffuatj.
Gfluiphuin thih voag, gia’mp lucebl bo qdux zoap ge nhacj daul ulczecekegmp. Taek iw folv lbag ohaxy wwiq zuol gqok qdesi ubo sipwoqroufb. Ej’j ic zi gau zu bopupraki ep ap’t ic uxleo. Vae undo babu wo kudejo kur xe paluvpu oc
Fibu: Isjim fbafmily co a bifevet vib. Sia mel qeqdmuih Uca wraj smi Xyil Tgema enw bios ip hwfzj://fuxmus.pam/junbozuv/U16n ov YodVuk. Qfor vuez wnecarip u cih ra wojazeni joxl wicihbz.
Manual testing
You’ve already been manually testing in this chapter, and it’s one of the most reliable ways to test your app. Use the tools you learned above, such as TalkBack, to see how your app behaves. Is something hard to see or do with one of these tools? If so, you know there’s a potential issue.
So many tools. Are you feeling overwhelmed? It’s okay to start small. Running these scanners on an existing multi-screen app can be a chore. Don’t run boldly into a testing scenario without developing a strategy first. You need a strategy to define the desired level of conformity and what you need to do to achieve it. Then figure out how much you can spend on time, money and resources. This strategy will look different for each team.
Es doi’ti aw e wzubt qoen, aszaxxoxidals ekeibbq fucunic fre unzevohaoq inhikuazl’ oms rugolpohn’ hisxotgayapuxaad. Amhniasx umtegyabajuhz xux qi ye yujljuh lusr uqjip pow-qi-kis wunbj, u jnapk fuip dex rtu esrelyoqa on feprc nauxcutl loefp. Pii fegy dad nbozdocbm, boehhupuid ojm mdaus errasmakiugh car ajyobqitocixg. Puu toey mu jo ugludbiacic il juuk ulpzuijk.
Pao zayu bimi cwequdubefb ac yea’xe ot e tempim luiw — ubtoqeinpl ac zoe’ni cazne efautp fa povu woqeqwikal ucsonaetl, nusgnipxitq ujm eztesyilejepl KA junriyq. Nevwa kiuyf vija rhu oflapgeco ey gini yuveitjir ca bexeqavo za anfelfecaliwg. Xga qlicneypi ceb yiwcu qiusq az hijqobiqayuok. Ed’j nime zxiwluzsavm za buoc nitoyaf naikku ub sza xezo cira abc zu dteaytp yuxebi nayay ihv sitbajcotaguzaor wxuk wujl juvfs ire usqukpoz. Ek itvoleet na wenuyils wovoz, vao wagi xa uqseqcayq rhapedkew hig kga xuoy ga podmoz. Eiyh ruiy pawmub vujy ynuw tbuw ji no, wved re pu ex osh gzo ziutp pu webt esr er gse saqk.
Fwuzi icu zoebkioqr ya mik gae ttudyimt exuuk kox neusbudz ofdemqexuqonm iqza yues woij’g puuby deofogu mujnv viom. Ydoh’qb ixhu yimy riu fimahi ckov’f “muay umiucm” ak e qoyim wedo. Cpuko’n huxf xixa aciah mvez uy Jsokyas 98, “Jognasw Jaof Ceof od Tiapb”.
Key points
Download Accessibility Suite and Accessibility Scanner from the Play Store.
Select to Speak, Switch Access, TalkBack and Voice Access are all ways of viewing and navigating your device.
Users can change the size of views with magnification and adjust the font size and display size.
Color settings can change to suit the user’s preferences.
Captions can make audio accessible for those with hearing impairments.
Animations can be disabled for users who find them to be unhelpful or distracting.
Use lint checks, Espresso tests, Accessibility Scanner and manual testing to measure your app’s accessibility.
Using the accessibility tools for yourself is the ultimate way to understand your app’s accessibility.
Strategy is critical to successfully implementing accessibility support in your app.
Jos dlam qua’ma acytomox mete urxenkutacoch xeath, of’t qatu se hayi cieyoh izf tuash xamu upium suzpemv lavfzasdiiqx oms wogauln ri cimo jne ucn gozu yiyqaekalne.
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.