Skip to content

fix(a11y): name the post's star counter with its visible count - #270

Merged
xabierlameiro merged 1 commit into
masterfrom
fix/a11y-star-counter-label
Oct 25, 2026
Merged

xabierlameiro merged 1 commit into
masterfrom
fix/a11y-star-counter-label

Conversation

@xabierlameiro

Copy link
Copy Markdown
Owner

Same defect #267 fixed on the header's GithubStars trigger, in the blog post's StarCounter link: its aria-label replaced the visible count, which axe-core 4.14 reports as label-content-name-mismatch (WCAG 2.5.3).

It surfaced on #268's Testing job and not on #267's because the accessibility suite hits the live GitHub API: while that request is rate-limited the counter shows an error glyph with no visible text, so there is nothing to mismatch, and the first run that got a count went red. The failure is environment-dependent, which is why it gets its own small PR rather than riding a dependency bump.

The label is now visually hidden text inside the link (name reads "Star this repository on GitHub 22"), with the assertion added to the unit test. No layout change: .visuallyHidden is absolutely positioned and takes no flex slot.

Merge before #268 and #269; both get synced with master afterwards so their gates re-run.


Generated by Claude Code

Same defect #267 fixed on the header's GithubStars trigger, in the blog
post's StarCounter link: its `aria-label` ("Star this repository on GitHub")
replaced the visible count, which axe-core 4.14 reports as
`label-content-name-mismatch` (WCAG 2.5.3). The gate only caught it on #268,
because the accessibility suite hits the live GitHub API: while that request
was rate-limited the counter showed an error glyph with no visible text and
there was nothing to mismatch; the first run that got a count went red.

The label is now visually hidden text inside the link, so the name reads
"Star this repository on GitHub 22" and no longer depends on the request.
`.visuallyHidden` is absolutely positioned, so the flex row keeps its layout.
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
the-last-dance Ready Ready Preview Oct 25, 2026 12:26pm UTC

@xabierlameiro
xabierlameiro marked this pull request as ready for review October 25, 2026 12:30
@xabierlameiro
xabierlameiro merged commit dfacf2c into master Oct 25, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview — bf7d955b Deployed Oct 25, 2026 by vercel[bot]
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.

2 participants