-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiPagination] Accessibility issues #2196
Comments
My suggestion here would be to start with H6 as default and have make a prop to define it. This is tangential, but the bigger issue is we need a landmark / hidden system in general for EUI. It will require a lot of thought, because I could see it requiring context or something in Kibana. |
Only problem I have with this concept is the arbitrary assignment of a heading tag to the controls.
|
Yeah, Will circle back tomorrow on where I saw the guidance to include a heading in something like this but at a glance I'd be ok ditching it, I think. |
Couldn't find a source so I think I just made it up. Reading through the Providing heading elements at the beginning of each section of content page though makes me think it's still a good idea. The closes it gets to explicitly mentioning this case is mentioning including headings for "secondary navigation". If someone is navigating a page using headings instead of landmarks, I think it makes sense to include a heading for each (or, at least, most?) landmarks on the page. In this case, a user navigating by landmarks can go to the |
@myasonik is it still open? |
Yup! Though I'll warn you my proposal up there was a bit of a draft so there may be some rounds of revisions it has to go through when it's up in PR and I test it more fully. Also, I'll give you a tip, that it'll be much easier to merge this if you can avoid making any breaking changes to the component API. Thanks! |
I think our current pagination component could be improved. Going to dump several ideas here, many of which can be mix-and-matched with what currently exists and a lot of it is up for debate.
Draft markup:
Benefits:
<nav>
landmark makes it easier to navigate to. Though not well supported, some screen readers will let users easily navigate back to the table thanks to the addition ofaria-controls
.aria-labelledby
will make it easy to find in rotor-like functionality.<h#>
makes it easier to navigate to as well. Not all screen reader users use landmarks to navigate. The addition of the heading makes it easier for those who don't. The big question here is what level heading to make it.*aria-current
tell the screen reader what page it's currently on. Usingaria-current="page"
oraria-current="location"
is up for debate but either is probably fine. Also marking that button asdisabled
sends a hit to users with a screen reader that doesn't supportaria-current
. Could also add more hidden text to fill that gap.* Maybe implementing developer can configure this? Or, it can try to intelligently guess based off reading the DOM from the table maybe? Though that probably becomes much slower. Also, in a real dream world of accessible content, we could parse the the table's header (because every table will have one) and use "Pagination for {tableHeader} table" instead of the more generic heading.
The text was updated successfully, but these errors were encountered: