-
Notifications
You must be signed in to change notification settings - Fork 535
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
[UnderlineNav] Accessibility Remediations #2406
[UnderlineNav] Accessibility Remediations #2406
Conversation
🦋 Changeset detectedLatest commit: e70fe8e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
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 can't speak to the underlying logic, but the functionality works from an assistive technology perspective.
One small comment on preserving focus rings, otherwise I'd say this is good to go!
751b761
to
0cf2156
Compare
This comment was marked as resolved.
This comment was marked as resolved.
fbd37fd
to
69dca48
Compare
@danielguillan I have updated the arrow button styles and the focus ring! I would appreciate your review 🙏🏼 I might have to address your feedback if there is any on a different PR because I'm aiming to send the UnderlineNav for the sign off a11y review early next week 🥳 Let me know if you have any concerns with it 🙌🏼 |
@broccolinisoup! Thank you for the updates! We'll need to ensure the arrow buttons provide a minimum touch target size of |
9bf1612
to
53328eb
Compare
Hi @danielguillan sorry that I ignored the minimal touch target! I have pushed another commit with the slide in/out. I would appreciate your review 🙏🏼 It is working fine on my side and I like it, definitely less paddings and more space. Also, could I get a review on the focus rings as well? I gave enough paddingX to the button to make the minimal touch target but not sure about paddingY. It is rectangular now, so not sure if it is a desired state. Let me know what you think 😊 Note: I did the slide in/out here because there were still other concerns holding this PR - just to let you know 😊 |
@broccolinisoup Thanks for all the updates! 🙌 Focus ring + touch targetI don't think we need to override the paddings of the arrow buttons. We want a small IconButton with its default size and focus ring and a safe touch target area of '44 × 44 pixels`. The current wrapper Also, while playing with the scroll behavior on mobile I've seen the focus ring flashing on the arrow buttons when they slide in and out. But I don't seem to be able to reproduce it every time… Component overflow hiddenWe need to set the overflow of the root element to Without Fade effectSometimes, the fade effect gradient layer becomes a solid background when scrolling and using the arrow buttons. |
Great feedback, thanks!! I'll address them in the next PR 🙌🏼 |
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.
🚀
53328eb
to
3c5025d
Compare
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.
Lets go! 🚀
This PR addresses the accessibility feedback from @ericwbailey on UnderlineNav. It also includes re-styling the arrow buttons to give more real estate for items for be selected as well as styling the focus ring of these buttons. I thought it will be good to ship it with accessibility remediations as focus rings were not in a great state to be sent to sign off review. Please let me know if anyone has any concerns with it 🙌🏼
Storybook link: https://primer-9cc12887c1-13348165.drafts.github.io/storybook/?path=/story/components-underlinenav--internal-responsive-nav
Accessibility Eng Review ticket: #921
Remediations
UnderlineNav
(nav item) on the stories and docsUnderlineNav
's ariaLabel prop available to themaria-disabled
attribute to the arrow buttons and conditionally set true/false when they become visible/hidden ( visibility depends on if there is any overflowing item on left/right)aria-disabled
attribute set to true. (Main motivation is to trigger a reread on the assistive technology with thearia-disabled=true
to communicate the arrow button is no longer there)focusable=true
to icons that arearia-hidden=true
Screenshots and screen recordings
UnderlineNav-slideinandout.mov
Min touch target size
Focus rings (Feedback needed)
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.