Skip to content
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

Update SegmentedControl to improve the experience for assistive technologies #2220

Merged
merged 4 commits into from
Aug 5, 2022

Conversation

mperrotti
Copy link
Contributor

@mperrotti mperrotti commented Aug 5, 2022

I got some feedback on the SegmentedControl interface guidelines PR that role="toolbar" didn't feel right for a segmented control (see comment).

I brought it up in this week's Accessibility Office Hours, and it was suggested that we change the segmented control from role="toolbar" behavior to role="list"/"listitem" behavior.

Screenshots

Before:
https://user-images.githubusercontent.com/2313998/180625732-901564bf-4b2e-4526-a2df-3848fb98d5b3.mp4

After:
https://user-images.githubusercontent.com/2313998/183119490-af7db406-63e5-4395-ba2f-76941691b497.mp4

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

…tyle bug for full-width icon-only buttons, fixes bug for icon-only buttons where onClick and other shared props weren't being passed
@mperrotti mperrotti requested review from a team and colebemis August 5, 2022 18:28
@changeset-bot
Copy link

changeset-bot bot commented Aug 5, 2022

🦋 Changeset detected

Latest commit: c7567a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 72.9 KB (0%)
dist/browser.umd.js 73.27 KB (0%)

@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 18:33 Inactive
@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 18:34 Inactive
@mperrotti mperrotti temporarily deployed to needs-approval August 5, 2022 18:40 Inactive
@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 18:45 Inactive
@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 18:45 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Confirmed that the SegmentalControl works as expected in the docs preview

@mperrotti mperrotti temporarily deployed to needs-approval August 5, 2022 18:58 Inactive
@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 19:04 Inactive
@mperrotti mperrotti temporarily deployed to github-pages August 5, 2022 19:04 Inactive
@mperrotti mperrotti merged commit f4ef7b4 into main Aug 5, 2022
@mperrotti mperrotti deleted the mp/segmented-control-role-update branch August 5, 2022 19:14
@primer-css primer-css mentioned this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants