SourcePagination
Inyandiko n'ingero zo kwerekana pagination kwerekana urukurikirane rw'ibirimo bifitanye isano bibaho kurupapuro rwinshi.
Dukoresha umurongo munini uhuza imiyoboro yacu, dukora amahuza bigoye kubura kandi byoroshye - byose mugihe dutanga ahantu hanini cyane. Pagination yubatswe nurutonde rwa HTML kugirango abasomyi ba ecran bashobore gutangaza umubare wibihuza bihari. Koresha ikintu cyo gupfunyika <nav>
kugirango umenye nkigice cyo kugendana kugirango usome abasomyi nubundi buryo bwikoranabuhanga bufasha.
Mubyongeyeho, nkurupapuro rushobora kuba rufite igice kirenze kimwe cyo kugendagenda, nibyiza gutanga ibisobanuro aria-label
kugirango <nav>
Uwiteka agaragaze intego yacyo. Kurugero, niba ibice bigize pagination bikoreshwa mukugenda hagati yishakisha ryibisubizo, ikirango gikwiye gishobora aria-label="Search results pages"
.
Urashaka gukoresha igishushanyo cyangwa ikimenyetso mu mwanya winyandiko kuri pagination zimwe? Wemeze gutanga ibisobanuro bikwiye byabasomyi hamwe aria
nibiranga .sr-only
akamaro.
Guhuza paji birashobora guhindurwa mubihe bitandukanye. Koresha .disabled
amahuza agaragara adashobora gukanda no .active
kwerekana page iriho.
Mugihe .disabled
icyiciro gikoresha pointer-events: none
kugirango ugerageze guhagarika imikorere yimikorere ya <a>
s, uwo mutungo wa CSS nturashyirwaho kandi ntabwo ubazwa kugendana na clavier. Nkibyo, ugomba guhora wongeyeho tabindex="-1"
kumurongo wamugaye kandi ugakoresha JavaScript yihariye kugirango uhagarike imikorere yabo.
Urashobora guhitamo guhinduranya ibikorwa cyangwa byahagaritswe inanga ya <span>
, cyangwa gusiba inanga mugihe cyambere / imyambi ikurikira, kugirango ukureho gukanda no gukumira icyerekezo cya clavier mugihe ugumana uburyo bugenewe.
Ibyiza binini cyangwa bito? Ongeraho .pagination-lg
cyangwa .pagination-sm
kubunini bwinyongera.
Hindura guhuza ibice bya pagination hamwe nibikoresho bya flexbox .