a11y-baseline.js cannot describe any page inside a campaign #771

Closed
opened 2026-09-23 07:36:45 +00:00 by claude-bot · 1 comment
Collaborator

Found while writing J6 (#770, #726).

splitViolations looks a page's tolerated rules up as an exact object key:

A11Y_BASELINE[pathname]

Every address inside a campaign carries a per-run UUID — /campaigns/<uuid>/highlights, /campaigns/<uuid>/storyline, /sessions/<uuid> — so no literal key can ever match one. From lane 3 onwards the only key that can match a campaign page is "*", and "*" quietens a rule on every page in the suite.

Why it matters now rather than later

J6 found a genuine WCAG 2.2 AA 1.4.3 contrast failure on the wiki front page. Fixing it was the right answer and is what #770 does — but it is worth noticing that tolerating it was not actually available. The only way to express "this one pre-redesign page has this one known problem, and the lane that rebuilds it will fix it" would have been to switch the rule off everywhere, which is worse than not having a baseline at all.

Five lanes still have to land on pages the journeys walk (4, 5, 8, 9, 11). Each will meet pre-redesign markup it is not yet rebuilding. The file's own header already anticipates exactly that. Today it cannot serve it.

The fix

Allow a RegExp (or a glob) as a key and match over Object.entries rather than indexing. A handful of lines:

// exact key first, then the first pattern key that matches, then "*"

a11y-baseline.js is {} today and that is worth preserving — this issue is not a request to start tolerating things. It is so that when a lane genuinely needs to say "not mine, not yet", it can say it about one page instead of about the whole suite.

🤖 Generated with Claude Code

Found while writing J6 (#770, #726). `splitViolations` looks a page's tolerated rules up as an **exact object key**: ```js A11Y_BASELINE[pathname] ``` Every address inside a campaign carries a per-run UUID — `/campaigns/<uuid>/highlights`, `/campaigns/<uuid>/storyline`, `/sessions/<uuid>` — so no literal key can ever match one. From lane 3 onwards the only key that *can* match a campaign page is `"*"`, and `"*"` quietens a rule on **every page in the suite**. ## Why it matters now rather than later J6 found a genuine WCAG 2.2 AA 1.4.3 contrast failure on the wiki front page. Fixing it was the right answer and is what #770 does — but it is worth noticing that **tolerating it was not actually available**. The only way to express "this one pre-redesign page has this one known problem, and the lane that rebuilds it will fix it" would have been to switch the rule off everywhere, which is worse than not having a baseline at all. Five lanes still have to land on pages the journeys walk (4, 5, 8, 9, 11). Each will meet pre-redesign markup it is not yet rebuilding. The file's own header already anticipates exactly that. Today it cannot serve it. ## The fix Allow a RegExp (or a glob) as a key and match over `Object.entries` rather than indexing. A handful of lines: ```js // exact key first, then the first pattern key that matches, then "*" ``` `a11y-baseline.js` is `{}` today and **that is worth preserving** — this issue is not a request to start tolerating things. It is so that when a lane genuinely needs to say "not mine, not yet", it can say it about one page instead of about the whole suite. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Collaborator

Fixed by #793 (merged in a028f55). A key in A11Y_BASELINE can now be a react-router :param pattern, such as /campaigns/:id/planning. The lookup tries an exact match first, then the first pattern that matches, and still layers "*" on top. Any entry whose owner text names no issue now throws at import time. The baseline is still {}: the sweep left it nothing to list.

🤖 Generated with Claude Code

Fixed by #793 (merged in a028f55). A key in `A11Y_BASELINE` can now be a react-router `:param` pattern, such as `/campaigns/:id/planning`. The lookup tries an exact match first, then the first pattern that matches, and still layers `"*"` on top. Any entry whose `owner` text names no issue now throws at import time. The baseline is still `{}`: the sweep left it nothing to list. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#771
No description provided.