Skip to content

fix(docs-infra): include visible text in the version and search button names - #72360

Open
DuncanFaulkner wants to merge 1 commit into
angular:mainfrom
DuncanFaulkner:docs/adev-nav-button-names
Open

DuncanFaulkner wants to merge 1 commit into
angular:mainfrom
DuncanFaulkner:docs/adev-nav-button-names

Conversation

@DuncanFaulkner

Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

  • angular.dev application / infrastructure changes

What is the current behavior?

axe-core 4.10 reports three failures on the two buttons at the top of the angular.dev navigation:

  • Version picker, label-content-name-mismatch (WCAG 2.5.3 Label in Name). The button shows "v22" but its accessible name is "Select Angular version", so a speech-input user who says "click v22" gets no match.
  • Search button, label-content-name-mismatch (WCAG 2.5.3). The button shows "Ctrl K" (or "⌘ K") but its accessible name is "Open search dialog with Control K".
  • Version picker, target-size (WCAG 2.5.8 Target Size (Minimum)). The button is 56 × 19px and sits too close to the logo link to pass on spacing.

Issue Number: N/A

What is the new behavior?

  • The version picker's name starts with the version it shows: "v22, select Angular version".
  • The search button takes its name from its content: a visually hidden "Search docs" (cdk-visually-hidden, as used elsewhere in adev) followed by the visible shortcut keys. Screen readers still hear the shortcut, and on narrow screens, where the shortcut is hidden, the name is "Search docs". The title tooltip is unchanged. searchTitle is no longer used, so it and its imports are removed.
  • The version picker has min-height: 24px.

I tested these changes by applying them to the live angular.dev page in Chrome and re-running axe. All three failures cleared, and button-name still passes.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The same scan also flags a few things this PR leaves alone, because they need a design decision:

  • In light mode, inline code on the home page is #e90364 on #f3f6ff, a contrast of 4.16:1 (4.5:1 needed). The Shiki github-light orange, #e36209 on white, is 3.48:1.
  • scrollable-region-focusable flags code blocks and .demo-list on the home page. Current Chrome and Firefox make scroll containers keyboard-focusable, but Safari doesn't.

I'm happy to open an issue for these, or follow up with a PR if you have a preferred direction.

…n names

The version picker's name now starts with the version it shows, and the
search button takes its name from its content, so speech-input users can
say the text they see (WCAG 2.5.3). The version picker is also at least
24px tall (WCAG 2.5.8).
@pullapprove
pullapprove Bot requested a review from atscott December 5, 2026 20:17
@angular-robot angular-robot Bot added the area: docs-infra Angular.dev application and infrastructure label Dec 5, 2026
@ngbot ngbot Bot added this to the Backlog milestone Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs-infra Angular.dev application and infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant