Repository navigation
fix(docs-infra): include visible text in the version and search button names - #72360
Open
DuncanFaulkner wants to merge 1 commit into
Open
DuncanFaulkner wants to merge 1 commit into
DuncanFaulkner wants to merge 1 commit into
Conversation
…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).
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.
PR Checklist
PR Type
What is the current behavior?
axe-core 4.10 reports three failures on the two buttons at the top of the angular.dev navigation:
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.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".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?
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". Thetitletooltip is unchanged.searchTitleis no longer used, so it and its imports are removed.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-namestill passes.Does this PR introduce a breaking change?
Other information
The same scan also flags a few things this PR leaves alone, because they need a design decision:
codeon the home page is #e90364 on #f3f6ff, a contrast of 4.16:1 (4.5:1 needed). The Shikigithub-lightorange, #e36209 on white, is 3.48:1.scrollable-region-focusableflags code blocks and.demo-liston 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.