Skip to content

Fix: Drawer heading focus (Fixes: #400)#401

Open
joe-replin wants to merge 5 commits into
masterfrom
issue/400
Open

Fix: Drawer heading focus (Fixes: #400)#401
joe-replin wants to merge 5 commits into
masterfrom
issue/400

Conversation

@joe-replin

@joe-replin joe-replin commented Jul 5, 2023

Copy link
Copy Markdown
Contributor

Fix

Testing

  1. Tab through drawer until drawer heading is heard (ex. "Top of side drawer")
  2. Test that the aria-label is the same within Firefox and then Chrome for good measure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Comment thread templates/drawer.hbs Outdated
@swashbuck swashbuck changed the title Fix: Create aria-label for drawer heading (Fixes: #400) Fix: Drawer heading focus (Fixes: #400) May 27, 2026
@swashbuck

Copy link
Copy Markdown
Contributor

The defer: false change fixes the timing so the heading gets announced. However, it caused VO to read "Top of side drawer" twice (once as the dialog name, once as a focused/clickable element).

Root cause: #drawer-heading is a hidden, label-only span. focusFirst was forcing focus onto it (adding tabindex), and it's also the aria-labelledby target, so it announced twice.

Pushed two small changes:

  • drawerView.js: focus the dialog itself (a11y.focus) rather than the heading span, so the dialog's accessible name is announced once.
  • drawer.hbs: aria-hidden="true" on #drawer-heading. It still resolves as the aria-labelledby name source, but drops out of the browse order so it isn't read a second time.

I tested in VoiceOver, so it now reads once on open as expected. Worth a check in NVDA/JAWS too.

Posted via collaboration with Claude Code

@swashbuck swashbuck moved this from Awaiting Response to Needs Reviewing in adapt_framework: The TODO Board May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

Drawer header label not announced

5 participants