Skip to content

Fix overlay Play button being reachable with Tab while hidden from screen readers #374

Open

Description

@swashbuck

Subject of the issue

The large Play button that sits over a video can be reached with the Tab key, even though it is hidden from screen readers. Keyboard users get two "Play" stops per video, and a screen reader says nothing on the first one.

Your environment

  • Framework v5.56.3, adapt-contrib-media v7.2.1
  • Chrome 155
  • macOS

Steps to reproduce

  1. Open a page with a video media component.
  2. Tab into the player.

Expected behaviour

One "Play" stop: the Play button in the control bar.

Actual behaviour

Focus lands on the large overlay Play button first, then on the control bar's Play button. cleanUpPlayer() sets aria-hidden="true" on .mejs__overlay-play (so the player is not announced with two Play buttons) but leaves the .mejs__overlay-button inside it at its default tab index. axe reports this as aria-hidden-focus (serious).

Suggested Fix

In cleanUpPlayer(), alongside the aria-hidden line, set tabindex="-1" on .mejs__overlay-button. Mouse and touch users can still click it.

Posted via collaboration with Claude Code

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

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions