fix(a11y): the receipt tape had a name nothing could read - #35
Merged
Merged
Conversation
`<div aria-label>` with no role is a `generic`, and generic prohibits an accessible name, so the label was being dropped and axe flags it (`aria-prohibited-attr`). `role="group"` is the smallest role that both permits the name and is honest about what the element is — a list role would require its children to be listitems, and the children are links. It surfaced only once the live tab became the default: in live mode the tape starts empty, so the label is the only thing a screen reader would have had to go on. shipcheck audited the replay hero every previous run and never saw it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Found by re-running shipcheck against production after the demo restart made the live tab the default hero.
<div class="rt-tape" aria-label="Seen while this page was open">has no role, so it isgeneric, and generic prohibits an accessible name — axe:aria-label attribute cannot be used on a div with no valid role attribute. The label was silently dropped.role="group"permits the name without lying about the element. A list role would require listitem children; the children are anchors.Verified with axe-core against a local production build: 0 violations (was 1). It only became reachable now because the live tape starts empty — previous shipcheck runs audited the replay hero.