fix(a11y): Remove pre tags from a11y-no-noninteractive-tabindex flag#13794
Merged
ascorbic merged 3 commits intowithastro:mainfrom May 21, 2025
Merged
fix(a11y): Remove pre tags from a11y-no-noninteractive-tabindex flag#13794ascorbic merged 3 commits intowithastro:mainfrom
ascorbic merged 3 commits intowithastro:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 5d27863 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 |
1 task
CodSpeed Performance ReportMerging #13794 will not alter performanceComparing Summary
|
ascorbic
reviewed
May 21, 2025
packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/a11y.ts
Outdated
Show resolved
Hide resolved
Merged
openscript
pushed a commit
to openscript/astro
that referenced
this pull request
Sep 12, 2025
…ithastro#13794) * fix(a11y): Remove pre tags from a11y-no-noninteractive-tabindex flag * add changeset * Update packages/astro/src/runtime/client/dev-toolbar/apps/audit/rules/a11y.ts --------- Co-authored-by: Matt Kane <m@mk.gg>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
pnpm exec changesetFixes #13793
Adds check for
pretags withina11y-no-noninteractive-tabindexa11y audit check.tabindex on pre tags is actually good for accessibility as it gives keyboard users the ability to scroll a code block. Shiki adds the tabindex attribute to pre tags by default.
Currently it is only checking for the element being scrollable, which might not always be the case in codeblocks. So we explicitly check for pre tags.
Testing
Docs