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: accept the 'switch' aria role during a11y checks #9792

Merged

Conversation

tugrulates
Copy link
Contributor

@tugrulates tugrulates commented Jan 23, 2024

Changes

Adds switch to the list of allowed aria roles for the dev toolbar checks.

Testing

Tested manually on the minimal example, by adding a switch role element.

<body>
  <h1>Astro</h1>
  <span role="switch">Switch Off</span>
</body>

Before and after:
Screenshot 2024-01-23 at 9 07 26 PM Screenshot 2024-01-23 at 9 06 28 PM

Adding aria-checked clears the error on the left.

Docs

Nothing to update. No explicit mention of the behavior for the switch role in the docs.

Copy link

changeset-bot bot commented Jan 23, 2024

🦋 Changeset detected

Latest commit: 1502f43

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

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 github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 23, 2024
@Princesseuh
Copy link
Member

Thank you! Not sure how I missed this when I added this.

@Princesseuh Princesseuh merged commit e22cb8b into withastro:main Jan 23, 2024
4 of 5 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 23, 2024
@tugrulates tugrulates deleted the fix/dev-toolbar-aria-switch-role branch January 24, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants