Skip to content

Label each window as a group for assistive technology - #1374

Open
captbaritone wants to merge 2 commits into
masterfrom
a11y-window-labels
Open

captbaritone wants to merge 2 commits into
masterfrom
a11y-window-labels

Conversation

@captbaritone

Copy link
Copy Markdown
Owner

Every window wraps its contents in FocusTarget, a tabIndex={-1} container that tracks which window is focused. This gives that element role="group" and an accessible name:

Window Name
main "Main window"
equalizer "Equalizer"
playlist "Playlist"
milkdrop "Milkdrop"

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:

within(getByRole("group", { name: "Equalizer" })).getByRole("button", { name: "Close" })

Known gap: the playlist window in shade mode renders PlaylistShade without a FocusTarget, so it isn't labelled. Wrapping it would change its layout and focus handling, so I've left it for a follow-up.

Testing

  • New FocusTarget.test.tsx checks the role and name for each window id.
  • tsc, eslint, prettier --check and vitest run pass locally.

@netlify

netlify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tourmaline-kringle-c98715 ready!

Name Link
🔨 Latest commit 0ac366e
🔍 Latest deploy log https://app.netlify.com/projects/tourmaline-kringle-c98715/deploys/6ad10b17b160895569911434
😎 Deploy Preview https://deploy-preview-1374--tourmaline-kringle-c98715.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.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Size Change: +112 B (+0.02%)

Total Size: 491 kB

📦 View Changed
Filename Size Change
packages/webamp/built/webamp.bundle.min.js 298 kB +58 B (+0.02%)
packages/webamp/built/webamp.lazy-bundle.min.js 192 kB +54 B (+0.03%)

compressed-size-action

@captbaritone
captbaritone force-pushed the a11y-window-labels branch 3 times, most recently from e84d776 to 163bafa Compare October 15, 2026 16:59
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).

This branch has not been deployed

No deployments
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