Skip to content

fix: Make keyboard focus visible and name the unnamed controls - #929

Draft
lfrancke wants to merge 2 commits into
mainfrom
phase3/a11y-structural
Draft

fix: Make keyboard focus visible and name the unnamed controls#929
lfrancke wants to merge 2 commits into
mainfrom
phase3/a11y-structural

Conversation

@lfrancke

@lfrancke lfrancke commented Sep 3, 2026

Copy link
Copy Markdown
Member

This continues my journey to improve our PageSpeed score.
We are not "great" on accessibility yet and this tries to fix some of that. It goes from 83 to 93 for me with this PR and more will come.

New:
Homepage
image

Operator
image

Old:
Homepage
image

Operator
image

There should be no user visible changes - I clicked around and it all looked good. But keyboard focus works much better. The menu bar for example can now be tabbed through and you can reach the search thing.
In the sidebar menu it is now also possible to tab through everything. Some items also didn't have a visible "ring" on it when selected via keyboard. That is all fixed. And some icons etc. now have alt names.

There will be more to come.

Seven controls in the chrome carried `outline: none` with no replacement, so
keyboard focus was invisible on the burger menu, the nav toggles, the TOC links,
the copy button and every `summary`. asciidoctor-tabs does the same to its tab
list items; that one is overridden here because its stylesheet is imported
first. The rings use `currentcolor` rather than a new variable, so the design
token work has nothing extra to reconcile and contrast stays out of scope.

The search opener was a `div`, so it was neither focusable nor named and
`Ctrl+K` was the only way in. Making it a `button` requires the popover and its
results list to become siblings, because a button may not contain interactive
content, which also stops a click inside the popover bubbling back to the opener
and reopening it.

The two logos, the four social links, the toolbar home link and Asciidoctor's
per-heading section anchors were all reachable with no accessible name. The
anchors are empty by construction, with the glyph coming from CSS, so they are
named from their heading at runtime.
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for stackable-docs ready!

Name Link
🔨 Latest commit b4dfcdd
🔍 Latest deploy log https://app.netlify.com/projects/stackable-docs/deploys/6a9951ebf010c30008a12412
😎 Deploy Preview https://deploy-preview-929--stackable-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The section anchors, the code-block copy button and the nav menu toggle are all
`visibility: hidden` until their container is hovered, so a keyboard user tabs
onto a control that is not drawn and cannot see where focus is. Pairing each
reveal with focus is what makes the focus rings on those three reachable
without a mouse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant