Tsallake zuwa babban abun ciki Tsallake zuwa kewayawa na takardu

Takaitaccen bayani na fasalulluka na Bootstrap da iyakoki don ƙirƙirar abun ciki mai isa.

Bootstrap yana ba da tsari mai sauƙi don amfani da shirye-shiryen shirye-shiryen, kayan aikin shimfidawa, da abubuwan haɗin gwiwa, ƙyale masu haɓakawa su ƙirƙira gidajen yanar gizo da aikace-aikacen da ke da sha'awar gani, masu wadatar aiki, da samun dama daga cikin akwatin.

Bayani da iyakancewa

Gabaɗayan damar kowane aikin da aka gina tare da Bootstrap ya dogara da yawa akan alamar marubucin, ƙarin salo, da rubutun da suka haɗa. Duk da haka, muddin an aiwatar da waɗannan daidai, ya kamata ya zama cikakke don ƙirƙirar gidajen yanar gizo da aikace-aikace tare da Bootstrap waɗanda suka cika WCAG 2.1 (A/AA / AAA), Sashe na 508 , da kuma daidaitattun damar samun dama da buƙatun.

Alamar tsari

Za'a iya amfani da salo da shimfidar Bootstrap zuwa nau'ikan sifofi masu yawa. Wannan takaddun yana nufin samar wa masu haɓakawa da mafi kyawun misalan ayyuka don nuna amfani da Bootstrap kanta da kuma kwatanta alamar ma'anar ma'anar da ta dace, gami da hanyoyin da za a iya magance matsalolin samun damar shiga.

Abubuwan haɗin gwiwa

Abubuwan haɗin gwiwar Bootstrap-kamar maganganun modal, menus na zazzagewa, da kayan aikin kayan aiki na al'ada-an tsara su don aiki don taɓawa, linzamin kwamfuta, da masu amfani da madannai. Ta hanyar amfani da abubuwan da suka dace da WAI - ARIA da halaye, waɗannan abubuwan ya kamata su kasance masu fahimta da aiki ta amfani da fasahar taimako (kamar masu karanta allo).

Saboda abubuwan haɗin Bootstrap an tsara su da gangan don zama gama gari, mawallafa na iya buƙatar haɗawa da ƙarin ayyuka da halaye na ARIA , da kuma halayen JavaScript, don isar da daidaitaccen yanayi da aikin sashinsu. Yawancin lokaci ana lura da wannan a cikin takaddun.

Bambancin launi

Wasu haɗe-haɗe na launuka waɗanda a halin yanzu ke haɗa palette ɗin tsoho na Bootstrap-wanda aka yi amfani da shi a duk faɗin tsarin don abubuwa kamar bambance-bambancen maɓalli, bambance-bambancen faɗakarwa, alamun ingantaccen tsari—na iya haifar da rashin isasshen launi (a ƙasa da shawarar WCAG 2.1 rabon bambancin launi na rubutu na 4.5:1). da WCAG 2.1 bambancin launi mara rubutu na 3: 1 ), musamman lokacin amfani da bangon haske. Ana ƙarfafa marubuta su gwada takamaiman amfaninsu na launi kuma, inda ya cancanta, da hannu su gyara/ƙara waɗannan launukan tsoho don tabbatar da isassun bambancin launi.

Boyayyen abun ciki na gani

Abun ciki wanda yakamata a ɓoye a bayyane, amma ya kasance mai isa ga fasahar taimako kamar masu karanta allo, ana iya tsara su ta amfani da .visually-hiddenajin. Wannan na iya zama da amfani a yanayin da ake buƙatar isar da ƙarin bayanan gani ko alamu (kamar ma'anar da aka nuna ta hanyar amfani da launi) zuwa ga masu amfani da ba na gani ba.

<p class="text-danger">
  <span class="visually-hidden">Danger: </span>
  This action is not reversible
</p>

Don sarrafa ma'amala mai ɓoye na gani, kamar hanyoyin haɗin "tsalle" na gargajiya, yi amfani da .visually-hidden-focusableajin. Wannan zai tabbatar da cewa ikon ya zama bayyane da zarar an mayar da hankali (ga masu amfani da madannai masu gani). Kula, idan aka kwatanta da daidai .sr-onlyda .sr-only-focusableazuzuwan a cikin sigar da ta gabata, Bootstrap 5's .visually-hidden-focusableaji ne wanda ya keɓe, kuma dole ne a yi amfani da shi tare da .visually-hiddenajin.

<a class="visually-hidden-focusable" href="#content">Skip to main content</a>

Rage motsi

Bootstrap ya haɗa da goyan baya don fasalin mai prefers-reduced-motionjarida . A cikin masu bincike/muhalli da ke ba mai amfani damar tantance abubuwan da suka fi so don rage motsi, yawancin tasirin canjin CSS a cikin Bootstrap (misali, lokacin da aka buɗe ko rufe hanyar magana, ko raye-rayen zamewa a cikin carousels) za a kashe su, kuma raye-raye masu ma'ana ( irin su spinners) za a rage gudu.

A kan masu binciken da ke goyan bayan prefers-reduced-motion, kuma inda mai amfani bai fito fili ya nuna alamar cewa sun fi son rage motsi ba (watau inda prefers-reduced-motion: no-preference), Bootstrap yana ba da damar gungurawa cikin santsi ta amfani da scroll-behaviorkayan.

Ƙarin albarkatu