-
Notifications
You must be signed in to change notification settings - Fork 637
SegmentedControl a11y fixes #2815
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
Conversation
…e SegmentedControl example to render the label as a span
…ws it associated with a label and caption
🦋 Changeset detectedLatest commit: 5b74f4f 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 📦
|
…er/react into mp/segmented-control-a11y-eng-fixes
is there a storybook / doc preview available? |
@kendallgassner - there is a preview deployment. Here is the docs page: https://primer-f38a78541d-13348165.drafts.github.io/SegmentedControl Here are the Storybook stories: https://primer-f38a78541d-13348165.drafts.github.io/storybook/?path=/story/components-segmentedcontrol-features--associated-with-a-label-and-caption None of the link's paths have changed since your review, you just have to look at them on https://primer-f38a78541d-13348165.drafts.github.io/ intead of https://primer.style/react/ |
Accessibility ReviewDocumentation
Semantics
Zoom
Misc.
|
Technically we are not 'requiring' this but all the examples are labeled. @mperrotti can we throw a console warning if there is no aria-labelledby or aria-label in the action menu case |
|
||
<Note variant="warning"> | ||
|
||
A `SegmentedControl` should not be used in a form as a replacement for something like a [RadioGroup](/RadioGroup) or [Select](/Select). See the [Accessibility section](https://primer.style/design/components/segmented-control#accessibility) of the SegmentedControl interface guidelines for more details. |
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.
<3
We already do :) |
@kendallgassner - the inaccessible tooltip is a known issue for @primer/react. We're working on a fix (PR) so we can make it accessible, but it's blocked right now. I'm going to fix the styling issue you pointed out and re-request a review. It would be nice to merge these other fixes and just leave the a11y review issue open until we replace the tooltip. |
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.
Thank you for all of these fixes!
3680446
to
f01f437
Compare
These changes fix accessibility defects called out in this comment: https://github.com/github/primer/issues/1495#issuecomment-1332693886
These changes also include updates to
ActionMenu
that allow us to reference the DOM node that labels the menu.Closes https://github.com/github/primer/issues/1495
Screenshots
There should be no visual changes
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.