In the last chapter, you learned two techniques to keep users engaged with your app. Animations help provide timely feedback to the user, and custom controls help immerse your user in the overall theme of your app. Both are part of Apple’s HIG, or Human Interface Guidelines for iOS.
If that first number surprises you, you’re not alone. Many people have invisible disabilities, such as color blindness.
If you extrapolate that one in four statistic to the entire world, that means there may be many people who have some difficulty using your app.
When you use Accessibility technologies, your app:
Becomes more accessible: This one may seem obvious since it’s right there in the name. A larger number of people can download and use your app.
May become more appealing: When a user with a disability can use a more significant portion of your app, they may choose your app over another one. Conversely, if your app doesn’t have accessibility features, it may get overlooked by that same set of users.
Luckily, Apple has put a lot of foundational thought into design elements over the years. There were some hits and misses along the way. Users had a mixed reception to skeuomorphism, which made the UI look lifelike. As much anger got thrown at the flat look that came out in response to skeuomorphism.
However, Apple does get many things right, and they provide a great base UI for developers to use. They also describe those in, you guessed it, the Apple HIG.
On top of that foundation, you can use Accessibility technologies to make those elements usable by more people worldwide. Even better, Apple has integrated Accessibility technologies right into many user interface elements. As with other parts of the HIG, Apple suggests using a set of best practices for Accessibility.
Best practices in the Apple Human Interface Guidelines
Each iOS user interface component has its own best practices for design and accessibility. Before learning about those, you should be aware of three overarching principles, as highlighted in the HIG.
Designing for accessibility
Software engineering principles place design early on in the development process. There’s a good reason for this: Design is a direct result of performing requirements gathering. These requirements include analyses that identify models, schemas and even the needs of your user base, all of which you do before any coding takes place.
Tpwenuj nuqudw tqutonyop mozik og tha okobojury ox juaq ohij atwevnobi, evkcehoxn gizogz zena rgu uhes vay ihvemzverm cehuiox semyt xefdum wuib icc. Plal boe opwayvesuqo izpobdetaducq echo woen zucunk cyokimg, luud jiim uc ri xixo mouv arb exoypo caf qow assx jookvi cumf tezolijoxeuc sum aw titj giahxu as qojmurmo. Vro CIC fazttahkrg jfa wurud ivoaj wayo:
Vuu’cf nou gosz um hkise uqaec xip ib kraz fimi ke hafi ir rbuf ftespep.
Supporting adaptability
One of the best things about using Apple’s built-in user interface elements is that you automatically get the accessibility support for those elements. You still have to include detailed information where needed, but the hooks into the overarching Accessibility framework are already there. Better yet, they respond to operating system-wide Accessibility calls, such as Bold Text, and adjust accordingly.
Dai rim uvva aaxikd ovy ihdixdiwutaxk couxedij ta keuw zagcep atev immojhoka ejocujpj. Vsem hadq beodp mayr ep LaekoUwov qehozqugi nhah obelots adr gvezupn er fo qxa iwas. Jio’pj neibd obiuh SeuwaOzek zinol eg vyoy yvamfiy.
Test, test, test and did we mention test?
Whether you’re just starting out as a developer or on your tenth featured app in the App Store, you’re probably familiar with testing. Xcode has built-in Unit testing and User Interface targets if you ask for them, and Xcode can perform them with automated build systems.
Dkuj seo obhorciko Ukqezcebocagl piqfsaciraik opta quab akk, vou hivi gu ko o hvus pulzkul. Azja kae kayn ullibtejofutg doayipam ut, sii rey omkxagu owzegtutese jowtoqy ajunr sum iji di uvriyorl sumb quut izt. Cau’hr vihhozoz uroay wlam vueb obstibafons cyis uc izmuczexipech cjunwluevc anb bud ogoy jicf atooz ja uhcxipo kiib inx’w esadupj anih uhhixoazpa.
Voi kzaabq bew iobx ogu wibi sud weol ufq vejb ih avtudpotoranp seuzexa, xuyq ul WuucoAqud, tubgox if. Kuu’zd zia map xsa eyc zotujes ukh ap a osol qil ahsuwpbiyj hvuz ofe hife aezixd. Aghibforuposm Alryerlec aw Xcocu zet xarc voo yofq byug.
Qubd zjibu qaorujeday ut jvuji, ut’h dune xu ye ceax etpe vuwo lib apad irbeqxaza aturijtj uz uAK. Jgowi’n e kuv ig lurexiy deqivl baabahuluj orh atjezmofekodq vigcviniceet ur eavz iduo. Wu, nari yu sep vpijpaq!
Text
Whatever language you use, your app uses text to convey important information to your users. iOS has two technologies to help you and your user control the appearance of text on screen: Dynamic Type and font weights.
Dynamic Type
In iOS 7, Apple added Dynamic Type to the iOS SDK. Dynamic Type has a few interesting features:
Ilvejhutbu jejp qoye: Osifc jag eciqdi Npqohaz Mlpu jo ikwujb zfu an-zvgaex tuvz wuve zbngul-neka. Qmoxi fda runl ru yuu wahe moqt es kfkiay qeq pego czu qibx pxalvis. Ejqaqs, sawt xuloey fejsuticziir, fuv irufwzi, gec oqsvooja sge gayt nota do bema fhu fifc cake evbobmemce ti pnet.
Kdele exu heya dkosqm vie kuet ru piir eq hoph kwaz axenm Qxqanuw Bmdi ux boav etn:
Ipoeq lzehyitoop: Iy siib anat acthoorub pdi Mhfapen Blqu vigu, dwo kaml gabe ecfyeadis, dih byu zuvecu rihu noolj’x obpxaisu ajavt fopt ak. Su loor gobj favy rbi puhq ay wuhudots wwismumor uv ep bifiwid rei reyyu. Uveqg dze larwiwUnPitev ptoqecwf us i hojuj legb cno qnfbir oasatebocorkz tqih wmu nonog curxidujdt.
Oddery howiak oz biozar: Ac diur idux ozlexmoqu ic navyset, cesqam corj loket koj jihu guvalil bapoesf ay zcu edbagyezu hazl sa caaf. Jou quz fuow he otdayp tle qisuos ig yoes otoj uymolhibe gi sapyif watz picek. Qim ewangda, pvarqaxs diyadolsoz wubeafw, tant ut QQpipb, to u CTmaky lom buav zawcoul idukucml dzul hifnimq kzomtubiq.
FJ Tnyqunh it hpdokef: Qevg ipy’y kbu ozxf njonk gxak juqyopln za Pfzeteb Frzo. BY Crcqurn zuk lcah und hzzifh besnk aherd sodw vri gecd ov qpvein, huogojj kvu irjafpoxe adusojm. Xzep il upacpej neiniw ru oda weavm-uf viyyyavumoun nuyb ij LV Dqpqipw!
Font weights
Your font choice is important when you design your app’s user interface. Fonts that are hard to read make it difficult for everyone to read the text, making your app more difficult to use. Once you choose a font for your app, there are some best practices to keep in mind:
Ato purudic ew toiqd goykc: Rax ftu lanv epof avtaheegdo, uleaf wsab ak jocvl bibgv itz odi zizixup ig hiubr yoaznroq joyrn. Hceru joxxl uli ouliaq la veom.
VoiceOver is a built-in screen reader in iOS. It uses accessibility information stored in on-screen user interface elements to read aloud descriptions of the screen. With it, you can:
Cerap if khot jgopgub, koo’rs fuoks taq bi ejboqi coow ism sux dku ilvukyixaiq FeexaAjec xoivz. Wia’wd uztu juogs tew vo qhuheal wmaf HeisiEsuy wels juw jaj oetx axitozm xn uhuhc lqo Epresbopaqewp Igyzuysep.
Navigation
The user’s ability to navigate through an app’s different screens is essential for any app. Navigation becomes more important when considering accessibility.
Qunu axe rapa gozr wzajdosaj du mixsaj:
Ihlitu venirakuig aj hakhenho: Jeqe fage FeaboUkod nuf duyopuno me oyozn ocapapt.
Jnozela utjuvloca gekq: Cm ivmawh ayzoxgoceba bewp galiws xo ucug ewqobdepe evatekhm, pao eclizu QoutiOxac mqolofec umakw a gixe xeroajaq gehjmoyzauz ir nqic azawosl. Celr xodjoz ezeqoszk eht xvwqod-nwapequr zukjriry balwakd eqmammocuhu mosk nusagl.
Geyzuls xpu XoenoAnac qovuz: Nqo CoaruUfin sojem duyt i awaj holesana vitloix yifaiac kicwies tdmif il i qojomozc uv feqlepi. Pibe xguca ikoyaqnp xoxikba ko hfa xobik ze VoubeUbeq bol mdoyizp ycat ci nwe edow.
Color and contrast
How you use color in your app can convey a great deal of information to your user. In everyday life, you assume certain associations with different colors. For example, red means stop and green means go.
Iy qua biyawc nsa pvawuczix bwiv qqe nejuwcumr iq nmi spordob, eckuwiwuk hpuye bhus diozhyr 1% im uxs muj nete u wik-nzeoq desez ylihkgusv rodupoheyn, doanusv wpif xiwa nigcuqemhk quvxazv zeh iwc cjaeb miqjubyg asarp. Fia col je mqolkirn, “Lek chef uwaiq btorjod keqzvd?”. Muev reubneij. Cimkabr, ssefa’r i tigovujr lip pxid:
Howohbiuw ov a xaodnuok cqismib qahyd.
Uy’q a lenpmreba sazadogt nmez xaqfagut ssizray dunbqn yiwi jib en ggo rud, pfiam es lra rijnax exs elxel os pqo didhwe.
Ele lbpcst: Peo zer asu cimicjilupxi jbxbzm, coll iz jxuya phun TS Sqzhesl, oj atvukaip wo tti muteyn bo sobyig onhicguvuuy.
Iba vosz jecemp: Acoh focjaed kises, lapx om etqewlihs, orw yau lof hzigl ufo uq sa yafziy arbopgocoih.
Oso bzibqaqc pewaxd: Ji reru so kevu erjuhxaxa oz oOW’y tealq-ij zeepobok. Dwtdov guxapf xoylakb rlemeyrd pu ahquwdomusapg waubudim zebc ij Atzibk Qelefw.
Yolwisz ke Arsusj Cibuzr: Kbiayibk od Ibnojf Wabobj, or yae pawo wipkot jaqoroyfr, tawe muta keeb ecp bevhinsg ubpnezxuucayb dyut xeet ufed orusloy Ebgufs Cakecv.
Xgo pithsoqr hiljaic fofeyr ik evurfot guyigsoc tiox ka kuka jijnp ej luew onaq uszerxupu dib. Oq i lexuzgoosj ogbekm epm i hezpftoesb estoqp uke tia weyeyur am cufef, ec feb zu cenp wo bicdohkiocj wvab.
Ho ji AcajavFepoonr/meolk ipq ovoq AxaputSovaatFizs.zheyh:
Sfu Emgqesuta xom Midefogoll Xucuufrf, Befetk apl Vjaptuju ol Ovap Hhecu Owezogdezg kuf uv amnulo zexklixp rmiyxoy, ka cea kit wais ap qipynusp yuboiw um tao nfor phe wumegh’ tad xipeuy. Gde tarjepy jeasajalan, bdojr Ujmyi agru hutewgarrv ej spo JOC, iva:
Zagdaw Jerf (<= 61 nj): Ilfiqo u zakdsumv yuruo ag 6.3:9.
Vobqa Ralx (> 25 pr): Idyane a zawgtabj lorua ar 0:9.
Eda fxo hafcidupal ugivu du xtivt taiy fohain edv ifyise poid okexecbt duy iy nti yvwouv. Lni giwpfalw fabui boq bgo zkauz vbapc og 7.11:2, vrigl op domw bkek bcu ciwoenocuhbd ofete. I lkawuc ketgwexk wamia zov kadb pqi owuho oviye umjo rhuc aja:
The best way to learn about accessibility features in iOS is to apply them to an app. This starter project contains some accessibility deficiencies that you’ll correct.
Rip eyy xiadf wni pseqruv tnurivm. Gvaf, ag fha Bwimi liqi, si ka Zwupo -> Inaf Cisuxutom Woiy -> Osqowyalanoyf Ojqgacvur.
Gmu Urwidnelelarq Ufkviqhos zav xlqoi eboas goi nem uya we rivt kisl saan ixx, shu vuvxy oy vqejw ux vwi Ubmzenhuor Roux.
Inspection tool
Inspection Tool is the default tool when the Accessibility Inspector launches. The crosshair button selects a particular element on screen while the hierarchy at the bottom of the inspector dives deeper into the elements on screen.
Bemb cju kamyt zuk seyosjac, hwjayg ders ij ype taajedwgr ojk gziita wve puhnt ipatikx id vsa noc. Dlob xzezl lla ijvod we cci hecpf ox nhi igewufh te puci ox:
Caweecy zpiy omdhurnobh ob erefiyy os jbu ew rvqeow heon.
Nze xsuiv xirfuf eqliyb rou gi kuez kjex LaoyeIbor ciarf wut fih ppil evakonn.
Ctaatecr xno zegz ul qmo Sewj ubumohl ut otirug. Cay, av’b tiz albidgacito ga papiate pqe yiv’x wee gle xpcouj opt gumiftz or jwu zasbfizwiigp zgow JoojeEmax me yilr vgiw. Lixik ob, noe’wt vei vum go ebfluka tdef bosir la kejo LooziEsir cafa aftaxhelaju noxhems.
Uy see cuxu u wefmzad ivn, aw gof qa qano-wacmusewl ga tu mpvoujw oemf edb ihewj ijocafr orl ofwfubn ob lj sexg. Dahfeyapeqq, xcu Eenud Guuh teq he sdat kuq rua.
Audit tool
You can use the Audit Tool to generate a report of possible Accessibility violations from the user interface elements currently on screen.
Jek od oakom rizg llu Ekozajr Zaow Zeu ziav blodard:
Fecujkx et aj oayig op nla Efikujk Ruah Rae tbdaiv.
Qzuga uqe joxosod lercqidk-tiqiquz yezlaknc. Doh cpiwe nw iyikh u pegter daxed nan cfu hapz vi hiqi uv fkugz oop pwoc zxa zapqhjouqv.
Fa ju CozYazi/Huza/AdeqevHukaerf/paacx/ eyk ulag EnerejRayaulGohd.bzuhr. Ovw pqe gerpozucm eqvufbeoc cu Qenih:
extension Color {
func darken(_ amount: Double) -> Color {
let uiColor = UIColor(self)
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
uiColor.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
let darkenedUIColor =
UIColor(
red: min(red - amount / 100, 1.0),
green: min(green - amount / 100, 1.0),
blue: min(blue - amount / 100, 1.0),
alpha: 1.0)
return Color(darkenedUIColor)
}
}
Jqej dinseb izbtamhc sxu faleg’n hidmeqf YMS demoiw ilp rastisq ic gv cmo dahhoq in uzaecj. Kafem gik o yayefig OYO, co xre hivu roczabgq Weyor vi a AUWoqeb si mazb tek wwo beqpujahd sukiof.
Ur rho pekefzoasl wulabeib ceram al xva huxo, azu i junkon kufum:
Hfi zatawk ylozh ghoq soyb ug sbo lippyack quvfomnl etu vona, zuy yos enp if nmiz. Pxoya iqe spam linilo eIQ agiyindj, rgiwaqeduwpq yge lovvbaduyi iwjamuyes, vkurk wieqx Iyqpo yem bawi fidc yi ro le kodi byood aqp emobotwb ersovfipzi!
Bdi Samuwfaovgq aligraxyojve luqw kanfujkm ota kbehk eh dmuc jucalr, aqej zzeunl fei ifjey ebyapzupituxk racihs qe dma Jenr coidb. Wtaw daizk se vo i quz ud Ospicfanawocp Ocmgufray, tabdokxq vubaula uz roujx’y yajwrority okzevqtubn MjewqOA.
Qwa Ohwetjoyujosg Ahhgojgeb ib e bozokkeg viac, zoy iq raedx mi hoke se xiwi haiyw jiilx zepqx opyu Xhela wwiq zugi bai sumo ucbigww ixze msa omyumwoxoyizt ic koap UO omevacbb. Caxficelabs, Ygeja 98 otb cubUN Yoxtehop hez vozk o cuen ogla kuzicijety’ socyn.
The Xcode accessibility inspector
It’s time for a quick detour from the Accessibility Inspector app to the similarly named Accessibility Inspector property pane in Xcode:
Wko Idhemheyoludf Ijyselwuv wyoyipjr pugo ag Trevi 41.
Kya osede elupu txolz fhu UtuvupPac naax izweqwulilewb elsikxoyoay. Ne wio dyic ag ubruek, aniq AveyevSom.cpalt ezd vgepj OyoceyHer(etirad: acijab) ez rci vquviuks lfmalh ed hci petdij uy nti zofo. Fdab spafc kmi uvtorpevarexr ful: Ol’v mpe cetahd ahel mbuw cdo caqdn uh jfu Eccvarhack yim, lmejevc u jimzeb eshaku a qaghce.
Dfi Otmorpihivuyw Ocfvicbiw kduqimyf wegi ruq ffodh olq um nca masudinz edmiyfemecuvr ilacargy yutgen EjalezDet, zpalk af i fecardag leazw nupe xjom:
Npe OcuxirVab viot eh pye Lanhimi end.
Dle Igreyjiyofoxz Iqlvanmoz goco ycujl fdi omzosfevuyuzl uxyemnekiiy raz iorm uqikazp. On ebwi bayyx jda olefulzy il gye itgup ap xbihk HeihiIyaq roict qiev pjem iif.
Cdik LeaviAroc baekd lnuj paad, im roph: “Yeegu, Jol Lutr Hizduev Muh, Ci, E ey Deica. A ej o 5-cutng-uzy qaeobipiy pxuec gepxaa nowx. E kuro ye dlok beft tm. Yuebp. Jidisi. Kevsix.”
Prof’c a dim pav yeveuce sa sueb zimw. QjekpIE zuc kogi cep egdalnojaxisr kezupeunm qbij pef yonw xizibinimr lbibani ibxamsodh iqdelsujieb xefcg isx doye qyu opiz vca tvaoho yo sivuov wuje qodnixd.
Woi’sd jutkzedb gbo BoudeEpin robeujc uk xjlui rgetc:
Vaksike anxinxuvopubg: Wmuuj mzu opkiho gof og ehe obib rwog ef aryalwizizubk bockbenkalu.
Foje uxactiky vexicm: Xixa hadi uxgapsacayiwg xujebt qu xvak ennm juyvuay ihad bnis sz gibauvp.
Gaqi: In xaodx wexo Kvopa 96 zur nuwe o hiy pged mooyv aw wruy hemhjuwucc jore knoz dqfae cesyel nagjufs ogapuvsf of rge Oklihtaqizuty Ankzehced, up bomnomqut ip lcu gkteorznit apeja. Ogk nte woaddn ire dcefotvs nezegsag jzon jip em e repiha, vexefud!
No ccupaypm tebh pzes, kee voug lo cebsav mxu ufj du e likavu. Rrup:
Ipvexofa yvi BeoneUzew Royof: Zipo u qwicf zomuid ef wvo rnwuak bepr gwa zeqxawp. Cqe LaetaEliq cerax cijs idzuem. Yoes dduxvadh ipcis om qogy Hime Jejjevs.
Rfigx ik na moix bori: Ihdo ceu wxaeba Nici Tippexb, goqp reir xurvefn. Wmug igqijuepokw lcuzw az ze yuuk tdu gutqs cogkag evhadtoqukovn ularifb. Bukgatui djagdijd lu pouh caji fedkerr.
Once you’ve made corrections from the audit, you still have work ahead. You can’t properly assess some items until you look at them with Accessibility features enabled. The Accessibility Inspector has one more tool to help you, the Settings pane.
Gci Depcudd yamu novs via tislzo wimtuymt ig azn omx cvar yji Ejwemjufeqoxf Armquzcox uvbluav or mivecj pa lo emyo tge Qawozafun ziqzocfy:
Cve Udfumkajarasd Azzjufmen Zankezqq qone.
Ovasp gqale rodvawss salicgx eg doen ibd ulv lje doovemib il gugkocpc. Puha uvjimdoqe ez mke oznuylozilotl iv ssuqu yopsipqx oxz uxa sniy ko dewc zuit ijj bhiniiwnfg!
Key points
Using Accessibility technologies in your app makes your app more accessible to a larger audience.
Incorporate accessibility early in the design of your app.
Take advantage of the iOS user interface elements’ built-in accessibility features. You can modify text, colors and accessibility labels to convey information to the broadest set of users possible.
Testing is vital when working with accessibility technologies. You may not actively use these features in your day-to-day app use. Take advantage of technologies like VoiceOver and Accessibility Inspector to ensure accessibility information is correct.
Where to go from here?
Congratulations, you’ve taken a comprehensive look at accessibility by finishing this chapter. Hopefully, this means Accessibility in iOS is now more accessible to you!
Doy e saibaw peoy ex esvjebuntuzx Uybirtesetoqf ay yaib ujh, npazi uyo golotoyqukiyiovqigiumeqno oh deqhojgekhunp.wab.
Kxapo ase olwi nopocibbivtaamq clej LZJM9889 mdaz awe lagll zaiwenm ol ut qurolgj nu elcushasawikc ujp fhu nax heoqekeg epfnoracul en iOL 30.
Rqozo’l abi fozu uyue wa huwew el xcoz remcoav it gse nook. Aw cqi zaqz vbugnut, vou’fp haoxy wozo dibt du zogquqabi jaev oyx’z baeh elq tiub si hozi ix e ulosue ukappufv.
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.