-
Notifications
You must be signed in to change notification settings - Fork 842
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
a11y rework of [EuiPagination] and friends #3294
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
d9b81f3
to
abf23a9
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly doing a quick functionality review:
Focus state
Do we really need a focus ring on the entire table after each page page selection? It seems excessive visually as users page through.
Perhaps you can link to some guidelines?
Compressed version
These numbers shouldn't be buttons.
Truncating / Number display
I don't think this is the fault of this PR, but the physical changes of this thing's width and position of the back button really concerns me. It shifts a lot and if the user is trying to use the previous arrow continuously, they have continuously move their mouse.
font-weight: $euiFontWeightBold; | ||
|
||
&#{&} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this crazy selector? It just concatenates the original selector to itself like: .euiPaginationButton-isActive.euiPaginationButton-isActive
. It seems like a hacky way to get specificity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a hacky way to get specificity.
That's exactly what it is 😆 First saw it many years ago on CSS Wizardry
Sounds like it's not a pattern in EUI so I can switch it to something else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how to best fix this without hacks... Do you have a suggestion?
This comment has been minimized.
This comment has been minimized.
This is excessive, at the point of distraction, which is its own top level concern. I know I say this a lot, but there is a balance. This is a pattern I do not see regularly on even high accessibility websites. I think ultimately only sometimes do you want to jump focus to the table itself. Sometimes you just want to continue tabbing through pagination. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the top-level usages of these changes (e.g. tables code), will wait on resolutions to existing conversations before really looking at pagination bar/button changes.
Totally agree with Dave's assessment of that focus jumping |
All the comments here seem reasonable and it's good to move forward but moving this PR back to a draft as I need to step away from it for an indefinite while to focus on some Kibana work. |
Don't think I can fully get back to this PR right now but wanted to merge master into it so it doesn't fall too far behind. I addressed just the easiest PR feedback while I had it open. Big change (that was easy to do) is I also removed focus ring from tables. Turns out, visible focus is only required on controls (things you can interact with) which is why things like skip links don't trigger giant visible focus rings around the entire main contents of the page. How do folks feel about moving focus to the table with the giant focus ring gone? |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
Have more time now so picking this back up. To reiterate my previous question:
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked over slack, but posting here so others can read. Functionally this works great.
How do folks feel about moving focus to the table with the giant focus ring gone?
Yes. That's fine. It works well in practice from what I see.
I made a quick video to go over some finer detail stuff with the table / data grid specifically in concert with the pagination controls. @myasonik and I talked about changing the caption
and aria-label
on the table/data-grid to better announce the pagination state. He's gonna try that out, otherwise from a functional perspective this looks 👍 to me.
Added page state info to the table If you watch Dave's video above, you'll see the table gets reread linearly when focus is moved to it. Did some testing and research and that seems to be expected. Also tested in VO+Safari and it seems to read the caption like 50% of the time and move focus to the wrong element the other 50% so I think we're into screen reader/browser discrepancies at this point. Windows screen reader testing for grid is on my to-do list (not planned for this PR, like within the next ~6 months) so I'll review this then as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes so far LGTM; latest build failure was a known flaky unit test
retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@myasonik and I noticed some browser inconsistencies, but they aren't the end of the world. I'm ok with this as it stands for merging.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3294/ |
Mistakenly put pagination changes (#3294) under wrong version
Summary
aria-*
attributesEuiPagination now sports the following changes:
<nav>
and the pages are in a<ul>
<a>
(instead of<button>
) if there is anid
to point to (similar idea to a skip link using<a>
)id
aria-controls={id}
EuiBasicTable, EuiInMemoryTable and EuiDataGrid pass in
aria-controls
to their pagination to take full advantage of the new structure.Breaking change
pageIndex
Checklist
- [ ] Added documentation examples