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 - Remove hidden alert role attribute #13051

Conversation

jakubmakielkowski
Copy link
Contributor

@jakubmakielkowski jakubmakielkowski commented Jan 19, 2024

Launch Checklist

Closes #12912

  • Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
  • Manually test the debug page.

Remove hidden alert role attribute.
There's no role "null" for HTML elements as mentioned by the author of the issue. My changes remove this attribute when alert is not visible. These are scroll zoom and touch pan alerts.
I could also use "none" role, but both approaches seem to look correct.

Tested on Chrome and Firefox on Windows 10 with axe devtools and NVDA screen reader.

See issue #12912

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute

@jakubmakielkowski jakubmakielkowski requested a review from a team as a code owner January 19, 2024 21:18
@CLAassistant
Copy link

CLAassistant commented Jan 19, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@stepankuzmin stepankuzmin left a comment

Choose a reason for hiding this comment

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

Hi @jakubmakielkowski,

Thanks for the contribution! Removing the role attribute looks good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility: Overlay has invalid role option role="null"
3 participants