Repository navigation
Conversation
Author
|
/agentic_review |
This branch has not been deployed
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.
Description
VitePress code groups use native radio inputs and associated labels to display alternative code snippets in a tabbed interface. However, the generated
.tabswrapper is a generic<div>without explicit radio-group semantics or an accessible name.This can prevent assistive technologies from identifying the relationship between the radio options and can trigger accessibility findings related to WCAG 2.1 Success Criterion 1.3.1 (Info and Relationships).
This PR adds
role="radiogroup"andaria-label="Code group"to the existing.tabselement. The change provides explicit grouping semantics and an accessible name while preserving the existing DOM hierarchy, radio inputs, labels, checked state, tab-switching behavior, and code panels.Changes made:
role="radiogroup"to the code-group tabs wrapper.aria-label="Code group"to give the radio group an accessible name.The change is intentionally limited to the accessibility issue. It introduces no new Markdown syntax and requires no changes to client-side tab-switching logic or theme CSS.
Validation performed:
pnpm typecheck: passed.pnpm format:fail: passed.git diff --check: passed.Linked Issues
Closes #5530
Additional Context
The implementation keeps the radio controls inside the existing
.tabswrapper and leaves the.blockscontainer outside the radio group's semantic boundary. This avoids restructuring the DOM and preserves compatibility with the existing tab-switching implementation.The updated regression test checks the accessible role and name, and the snapshot verifies that the existing radio inputs, associated labels, checked state, and code panels remain intact.
Please review whether the default accessible name,
Code group, is appropriate for VitePress's code-group component. Custom group naming and localization are intentionally outside the scope of this PR.Live screen-reader testing and a separate end-to-end accessibility audit have not yet been performed.