Skip to content

Fix: Overlay Play button reachable with Tab, and focus lost after starting a video from it (fixes #374, fixes #375) - #378

Open
swashbuck wants to merge 1 commit into
masterfrom
issue/374
Open

swashbuck wants to merge 1 commit into
masterfrom
issue/374

Conversation

@swashbuck

Copy link
Copy Markdown
Contributor

Fixes #374
Fixes #375

Fix

  • The large Play button over a video is no longer a Tab stop. It was already hidden from screen readers, so keyboard users met a silent extra Play stop before the control bar.
  • Starting a video from the large Play button moves focus to the control bar's Pause button. The button hides itself once playback starts, so focus used to fall back to the page and screen readers restarted from the top.
  • onOverlayClick, still bound in _.bindAll and removed in remove() but no longer attached, is used for this. MediaElement already starts playback on that click, so the handler only moves focus. It listens on the overlay layer rather than the button: if the page shifts during the click, the click lands on the layer.

Testing

  1. Tab into a video Media component. There is one Play stop, in the control bar.
  2. Click the large Play button. The video plays, focus is on Pause, the page does not scroll and no focus ring shows. Enter then pauses.
  3. With NVDA or JAWS on Chrome, and VoiceOver on iOS, start a video with the large Play button. Reading continues from the player, not the top of the page.

Dependencies

Posted via collaboration with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Reviewing

1 participant