fix(web): say which page is current, not just colour it - #91
Open
42-v wants to merge 1 commit into
Open
Conversation
The nav already knew. isActive(link.to) picks the highlight at all three link sites, and the result was expressed entirely as a background tint and a text shade -- so a screen-reader user tabbing the navigation heard the same thing on every entry and could not tell which page they were on. WCAG 1.3.1: what presentation conveys has to be available programmatically too. aria-current="page" now comes from the same call that picks the colour, so the two cannot disagree, and it is bound to undefined rather than "false" on the inactive links -- aria-current="false" is a value assistive technology reads and then ignores, which is noise where absence is the correct signal. The gate pairs them rather than checking a list of links: any element whose appearance consults isActive must also bind aria-current. That holds the fourth nav entry somebody adds, which a component test of the three that exist today would not. Mutation-verified against each site. Coverage moves 707/715 to 713/721 branches -- the new ternaries, all covered.
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.
UI plan item A5, the half that needs no new strings.
The nav already knew.
isActive(link.to)picks the highlight at all three link sites, and the result was expressed entirely as a background tint and a text shade — so a screen-reader user tabbing the navigation heard the same thing on every entry and could not tell which page they were on. WCAG 1.3.1: what presentation conveys has to be available programmatically too.aria-current="page"now comes from the same call that picks the colour, so the two cannot disagree. Bound toundefinedrather than"false"on inactive links —aria-current="false"is a value assistive technology reads and then ignores, which is noise where absence is the correct signal.App.vue:57App.vue:82App.vue:123The gate pairs them rather than checking a list of links: any element whose appearance consults
isActivemust also bindaria-current. That holds the fourth nav entry somebody adds, which a component test of the three that exist today would not. Mutation-verified — removing the binding from any one site fails it by name:Not in this PR: the skip link and
<main id tabindex>, the other half of A5. That needscommon.skipToContentacross 38 locales, which is the one new string in the whole UI plan and an owner decision (#297).Verified: 749 web tests pass;
pnpm lintclean; branches 707/715 → 713/721, the new ternaries all covered; statements unchanged.