Ukufinyeleleka
Ukubuka okufushane kwezici ze-Bootstrap kanye nemikhawulo ekudalweni kokuqukethwe okufinyelelekayo.
I-Bootstrap inikeza uhlaka olusebenziseka kalula lwezitayela ezenziwe ngomumo, amathuluzi esakhiwo, nezingxenye ezisebenzisanayo, okuvumela abathuthukisi ukuthi bakhe amawebhusayithi nezinhlelo zokusebenza ezikhangayo ngokubukeka, ezicebile ezisebenzayo, nezifinyeleleka ngaphandle kwebhokisi.
Uhlolojikelele kanye nemikhawulo
Ukufinyeleleka sekukonke kwanoma iyiphi iphrojekthi eyakhiwe nge-Bootstrap kuncike kakhulu emakhakheni ombhali, isitayela esengeziwe, kanye nombhalo abawufakile. Kodwa-ke, inqobo nje uma lokhu kusetshenziswe ngendlela efanele, kufanele kwenzeke ngokuphelele ukudala amawebhusayithi nezinhlelo zokusebenza nge-Bootstrap egcwalisa i- WCAG 2.1 (A/AA/AAA), Isigaba 508 , kanye nezindinganiso zokufinyelela ezifanayo nezimfuneko.
Umaki wesakhiwo
Isitayela nesakhiwo se-Bootstrap singasetshenziswa ezinhlobonhlobo zezakhiwo zokumaka. Le mibhalo ihlose ukunikeza onjiniyela izibonelo ezinhle kakhulu zokubonisa ukusetshenziswa kwe-Bootstrap ngokwayo futhi ibonise umaka we-semantic ofanelekile, okuhlanganisa nezindlela lapho ukukhathazeka okungase kube khona ukufinyeleleka okungasingathwa ngakho.
Izingxenye ezisebenzisanayo
Izingxenye ezisebenzisanayo ze-Bootstrap—ezifana nezingxoxo ze-modal, amamenyu okwehlayo, namathiphu angokwezifiso—ziklanyelwe ukusebenzela ukuthinta, igundane, nabasebenzisi bekhibhodi. Ngokusetshenziswa kwezindima nezimfanelo ze- WAI - ARIA ezifanele , lezi zingxenye kufanele ziqondakale futhi zisebenze kusetshenziswa ubuchwepheshe obusizayo (njengezifundi zesikrini).
Ngenxa yokuthi izingxenye ze-Bootstrap ziklanyelwe ngenhloso ukuthi zibe yijenerikhi, ababhali bangase badinge ukufaka ezinye izindima nezimfanelo ze -ARIA , kanye nokuziphatha kwe-JavaScript, ukuze badlulisele ngokunembe kakhudlwana imvelo nokusebenza kwengxenye yabo. Lokhu kuvame ukuphawulwa embhalweni.
Ukungafani kombala
Ezinye izinhlanganisela zemibala okwamanje ezakha iphalethi emisiwe ye-Bootstrap—esetshenziswa kulo lonke uhlaka lwezinto ezifana nokuhluka kwezinkinobho, ukuhluka kwezixwayiso, izinkomba zokuqinisekisa amafomu—kungase kuholele ekuhlukeni kombala okwanele (ngezansi kwesilinganiso sokungafani sombhalo we-WCAG 2.1 esinconyiwe esingu-4.5:1 kanye nesilinganiso sokungafani sombala okungewona wombhalo we-WCAG 2.1 ongu-3:1 ), ikakhulukazi uma sisetshenziswa kungemuva elikhanyayo. Ababhali bakhuthazwa ukuthi bahlole ukusebenzisa kwabo okukhethekile kombala futhi, lapho kudingekile, baguqule/balule le mibala ezenzakalelayo mathupha ukuze baqinisekise izilinganiso ezanele zokungafani kombala.
Okuqukethwe okufihliwe ngokubukeka
Okuqukethwe okufanele kufihlwe ngokubonakalayo, kodwa kuhlale kufinyeleleka kubuchwepheshe obusizayo njengezifundi zesikrini, kungenziwa isitayela kusetshenziswa .visually-hidden
ikilasi. Lokhu kungaba usizo ezimeni lapho ulwazi olwengeziwe olubonakalayo noma izimpawu (njengencazelo eshiwo ngokusetshenziswa kombala) kudingeka futhi zidluliselwe kubasebenzisi abangabuki.
<p class="text-danger">
<span class="visually-hidden">Danger: </span>
This action is not reversible
</p>
Ukuze uthole izilawuli ezisebenzayo ezifihliwe ezibonakalayo, njengezixhumanisi zendabuko "zeqa", sebenzisa .visually-hidden-focusable
ikilasi. Lokhu kuzoqinisekisa ukuthi isilawuli siyabonakala uma sesigxilile (kubasebenzisi bekhibhodi ababonayo). Qaphela, uma kuqhathaniswa nokulingana .sr-only
namakilasi .sr-only-focusable
ezinguqulweni ezedlule, i-Bootstrap 5 iyikilasi elizimele .visually-hidden-focusable
, futhi akumele lisetshenziswe ngokuhambisana .visually-hidden
nekilasi.
<a class="visually-hidden-focusable" href="#content">Skip to main content</a>
Ukunyakaza okuncishisiwe
I-Bootstrap ihlanganisa ukusekela prefers-reduced-motion
isici semidiya . Kuziphequluli/izindawo ezivumela umsebenzisi ukuthi acacise okuncamelayo ngokunyakaza okuncishisiwe, imiphumela eminingi yoshintsho lwe-CSS ku-Bootstrap (ngokwesibonelo, lapho ingxoxo ye-modal ivuliwe noma ivaliwe, noma ukugqwayiza okuslayidayo kuma-carousels) kuzokhutshazwa, kanye nokugqwayiza okunenjongo ( njengama-spinner) azokwehliswa.
Ezipheqululini ezisekela prefers-reduced-motion
, nalapho umsebenzisi engazange asayine ngokusobala ukuthi angathanda ukunyakaza okuncishisiwe (okungukuthi lapho prefers-reduced-motion: no-preference
), i-Bootstrap inika amandla ukuskrola okushelelayo kusetshenziswa scroll-behavior
isakhiwo.
Izinsiza ezengeziwe
- Imihlahlandlela Yokufinyeleleka Kokuqukethwe Kwewebhu (WCAG) 2.1
- Iphrojekthi ye-A11Y
- Amadokhumenti okufinyelela e-MDN
- I-Tenon.io Isihloli Sokufinyeleleka
- I-Colour Contrast Analyzer (CCA)
- Ibhukhimakhi ye-"HTML Codesniffer" yokuhlonza izinkinga zokufinyeleleka
- I-Microsoft Accessibility Insights
- Amathuluzi okuhlola i-Deque Ax
- Isingeniso Sokufinyeleleka Kwewebhu