Repository navigation
Label each window as a group for assistive technology - #1374
Open
captbaritone wants to merge 2 commits into
Open
captbaritone wants to merge 2 commits into
captbaritone wants to merge 2 commits into
Conversation
✅ Deploy Preview for tourmaline-kringle-c98715 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +112 B (+0.02%) Total Size: 491 kB 📦 View Changed
|
captbaritone
force-pushed
the
a11y-window-labels
branch
3 times, most recently
from
October 15, 2026 16:59
e84d776 to
163bafa
Compare
FocusTarget wraps the contents of every window, so give it role="group" and an accessible name: "Main window", "Equalizer", "Playlist" or "Milkdrop". This tells screen reader users which window a control belongs to, and lets tests scope role-based queries to a window (several windows have a "Close" button).
captbaritone
force-pushed
the
a11y-window-labels
branch
from
October 15, 2026 17:19
163bafa to
0ac366e
Compare
This branch has not been deployed
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.
Every window wraps its contents in
FocusTarget, atabIndex={-1}container that tracks which window is focused. This gives that elementrole="group"and an accessible name:Screen readers announce the group when focus enters a window, so users know which window a control belongs to. That matters because several windows have a "Close" or "Toggle Windowshade Mode" button. It also lets embedders' tests scope role-based queries to a window, for example:
Known gap: the playlist window in shade mode renders
PlaylistShadewithout aFocusTarget, so it isn't labelled. Wrapping it would change its layout and focus handling, so I've left it for a follow-up.Testing
FocusTarget.test.tsxchecks the role and name for each window id.tsc,eslint,prettier --checkandvitest runpass locally.