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

Fix accessibility bug of missing accessible name on Dialog #2210

Merged
merged 7 commits into from
Aug 17, 2023

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Aug 15, 2023

What are you trying to accomplish?

When I was doing unrelated work in dotcom, I noticed that Primer::Alpha::Dialog is not rendering with an accessible name resulting in an Axe failure of aria-dialog-name:

Ensures every ARIA dialog and alertdialog node has an accessible name"

This is unexpected since having an accessible name is also clearly documented in the docs.

There's currently no corresponding behavioral test written for this component. It's likely we're not running an axe scan when the Dialog is an open state, causing us to miss this error.

This PR fixes the bug and adds a behavioral system test.

List the issues that this change affects.

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

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.

What approach did you choose and why?

Fix bug and add missing behavioral test.

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.

Merge checklist

  • Added/updated tests

Questions to reviewers

📣 Are behavioral components (or components that render with JS) identified in any way? I couldn't find anything that would indicate a component has JS associated with it. I was thinking it might be worth having a check that ensures all behavioral components have a corresponding system_test written.

This is beneficial because it would ensure that we have checks in place for how a component should behave, and would also make sure that axe is ran against various states of the component (e.g. when dialog is open). This is also extra important because we don't seem to have custom element tests. This would help surface more accessibility or behavioral issues at the testing stage.

@khiga8 khiga8 temporarily deployed to preview August 15, 2023 20:24 — with GitHub Actions Inactive
@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Aug 15, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 15, 2023

🦋 Changeset detected

Latest commit: 4a59f8d

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

@khiga8 khiga8 marked this pull request as ready for review August 15, 2023 21:01
@khiga8 khiga8 requested review from a team, camertron and TylerJDev August 15, 2023 21:01
@khiga8 khiga8 self-assigned this Aug 15, 2023
Copy link
Contributor

@TylerJDev TylerJDev left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for this fix! ✨

@khiga8
Copy link
Contributor Author

khiga8 commented Aug 17, 2023

I am not authorized so please merge in, thank you!

@keithamus keithamus merged commit aded2aa into main Aug 17, 2023
29 checks passed
@keithamus keithamus deleted the kh-add-missing-label branch August 17, 2023 14:41
@primer primer bot mentioned this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor release ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants