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

ActionMenu: Move aria-checked to button #2060

Merged
merged 2 commits into from
Jun 7, 2023
Merged

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Jun 5, 2023

What are you trying to accomplish?

This PR fixes an issue causing screen readers to not announce the checked/unchecked status of ActionMenu items.

Integration

No code changes required in production.

List the issues that this change affects.

Closes https://github.com/github/primer/issues/2244

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

As suggested in https://github.com/github/primer/issues/2244, I moved the aria-checked attribute from the <li> element to the <button>.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
    - [ ] Added/updated documentation
    - [ ] Added/updated previews (Lookbook)
  • 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.

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

🦋 Changeset detected

Latest commit: 499f3bb

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

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

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

@camertron camertron temporarily deployed to preview June 5, 2023 20:28 — with GitHub Actions Inactive
@github-actions github-actions bot added css Pull requests that update CSS code javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code labels Jun 5, 2023
@camertron camertron temporarily deployed to github-pages June 5, 2023 20:33 — with GitHub Actions Inactive
@camertron camertron marked this pull request as ready for review June 5, 2023 20:58
@camertron camertron requested a review from a team as a code owner June 5, 2023 20:58
@camertron camertron requested review from a team, lukasoppermann and jonrohan June 5, 2023 20:58
@camertron camertron changed the title ActionMenu: Move aria-checked to button ActionMenu: Move aria-checked to button Jun 5, 2023
@camertron camertron requested review from keithamus and removed request for jonrohan June 6, 2023 17:19
@camertron camertron merged commit bc40f58 into main Jun 7, 2023
@camertron camertron deleted the action_menu_checked branch June 7, 2023 17:02
@primer-css primer-css mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css Pull requests that update CSS code javascript Pull requests that update Javascript code minor release ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants