Skip to content

a11y: fix contrast, footer link affordance, and table headers (metric: Accessibility) - #5

Merged
phyce merged 2 commits into
phyce:mainfrom
phyceClaw:a11y-contrast-table-headers
Jul 31, 2026
Merged

a11y: fix contrast, footer link affordance, and table headers (metric: Accessibility)#5
phyce merged 2 commits into
phyce:mainfrom
phyceClaw:a11y-contrast-table-headers

Conversation

@phyceClaw

Copy link
Copy Markdown
Contributor

Metric targeted: Accessibility

Currently 90–93 across all ten pages I audited (Lighthouse, Chrome 151, mobile preset). Three axe failures repeat site-wide:

Failure Pages affected
color-contrast 10/10
link-in-text-block 10/10
td-has-header 7/10

1. Colour contrast — 10/10 pages

text-gray-500 (#6a7282) is the site's secondary-text colour. Measured against the six dark backgrounds actually in use:

Background gray-500 (current) gray-400 (this PR)
#0d0d0d 4.02 7.47
#141414 3.81 7.08
#171717 3.71 6.89
#1c1c1c 3.52 6.55
#222222 3.29 6.12
#262626 3.13 5.82

All fail the required 4.5:1. text-gray-600 (#4a5565), used on the co-author line, was worse at 2.00:1. Both become text-gray-400, which clears 4.5:1 everywhere with margin.

2. Footer link relies on colour — 10/10 pages

#ff6900 on #6a7282 surrounding text is 1.67:1 (3:1 required), with no other affordance. This one cannot be fixed by recolouring — even against the new gray-400 the ratio is only 1.11:1 — so the link is now permanently underlined rather than underlined on hover.

3. Data cells without headers — 7/10 pages

Every ranking table ends with an empty <th> above the Stats/Profile link column:

<th scope="col" class="plugin-table__head-cell"></th>

so those <td>s have no associated header. Each now carries a visually hidden label ("Stats" or "Profile" to match the column's link text), using a BEM class with @apply sr-only per the project's styling convention rather than a bare utility in the markup.

Scope note

The contrast change is applied to all text-gray-500/600 occurrences in the components, not only the specific nodes Lighthouse happened to reach — the same colour on the same backgrounds fails identically in states the audit didn't exercise. This is a deliberate, visible design change: secondary text gets lighter.

Verification

npm run build and vue-tsc --noEmit both pass; sr-only compiles into the emitted CSS.

⚠️ The score improvement is projected, not measured — this VPS is build-only, so I could not re-run Lighthouse against the change.

🤖 Generated with Claude Code

Metric: Accessibility (90-93 -> expected 100 on all ten audited pages)

Three axe failures repeat across every page:

1. color-contrast (10/10 pages). text-gray-500 (#6a7282) is used for
   secondary text on the dark backgrounds, giving 3.13-4.02:1 against
   the six backgrounds in use (#0d0d0d, #141414, #171717, #1c1c1c,
   #222222, #262626) where 4.5:1 is required. text-gray-600 (#4a5565)
   on the co-author line was worse at 2.00:1. Both are replaced with
   text-gray-400 (#99a1af), which measures 5.82:1 in the worst case
   (#262626) and 7.47:1 in the best.

2. link-in-text-block (10/10 pages). The footer link is #ff6900 inside
   #6a7282 text, 1.67:1 where 3:1 is required, and had no non-colour
   affordance. Recolouring cannot fix this - even against the new
   gray-400 the ratio is 1.11:1 - so the link is now permanently
   underlined instead of only on hover.

3. td-has-header (7/10 pages). Every ranking table ends with an empty
   <th> above the Stats/Profile link column, leaving those data cells
   without a header. Each now carries a visually hidden label.

The hidden labels follow the existing BEM + @apply convention rather
than putting a bare sr-only utility in the markup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@phyce
phyce merged commit f038b1b into phyce:main Jul 31, 2026
3 checks passed
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