Initials avatars fail WCAG AA contrast: WG hue text on its own tint

Open Beginner friendly
#2,248 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
css
Domain
accessibility

Research direction

Start with .mc-avatar--initials in assets/css/site.css around line 743, then search for the listed sibling selectors and Summer School faculty monograms. Check computed contrast in both themes at desktop and phone widths; done means the initials meet 4.5:1 while their backgrounds and borders stay unchanged.

Written by the indexing model from the issue text.

Description

a11y bug

What's happening

.mc-avatar--initials (assets/css/site.css, line 743) sets the initials in the Working Group hue, var(--wg-accent, var(--accent-2)), on a 14% tint of the same hue. At 1.1rem and weight 600 the text needs 4.5:1. Measured on a glass card in light mode: WG4 1.88:1, WG2 2.17:1, the --accent-2 fallback 3.0:1, WG1 3.75:1, WG3 3.77:1. In dark mode WG1 and WG3 measure 3.25:1.

Why it matters

Every initials avatar fails WCAG 2.1 AA 1.4.3 in light mode, and the WG1 and WG3 ones fail in dark mode too. They appear wherever a member has no headshot, and the accessibility statement claims AA for both themes.

Fix path

Set the text colour to the hue mixed with --ink, which flips with the theme:

color: color-mix(in srgb, var(--wg-accent, var(--link)) 55%, var(--ink));

Measured results: light 4.9:1 (WG4) to 7.5:1 (WG3), dark 6.3:1 (WG1) to 8.5:1 (--link). Keep the background and border as they are. Grep for siblings that set a WG hue as text on its own tint (.spotlight-initials, .fg-initials, the Summer School faculty monograms) and apply the same rule. Verify with getComputedStyle at desktop and phone width in both themes.

Target

v1.16.0


Generated by Claude Code

Dominant language
HTML
Stars
1
Forks
1
Avg merge
1h 19m
Merged PRs (30d)
163

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EISSeuropa/netsec.github.io

All issues in EISSeuropa/netsec.github.io

Similar issues

More Accessibility issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.