Version: @videojs/html 10.0.0-rc.2 (not reproducible on 10.0.0-beta.31)
Browser: Chrome 151 (macOS)
Steps to reproduce
Stock default video skin, no custom code (CDN build @videojs/cdn@10.0.0-rc.2: video.js + video.css + media/hlsjs-video.js):
<video-player>
<video-skin>
<hlsjs-video src="https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multi-lang.ism/.m3u8" muted playsinline></hlsjs-video>
</video-skin>
</video-player>
- Open Settings.
- Open Speed.
- Click
1.5× (same with a Back row, and with the Audio / Captions pages).
Expected
The submenu closes and focus returns to the parent row without an accessibility warning.
Actual
Chrome logs:
Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. …
Element with focus: <media-menu-radio-item.media-menu-radio-item>
Ancestor with aria-hidden: <media-menu-content.media-menu-content#…-content>
Focus does end up on the parent row, but for that moment the focused item is inside an aria-hidden page, so assistive tech is told the focused element is hidden.
Cause
setInactive() in @videojs/core dist/dev/dom/ui/menu/popup.js sets aria-hidden="true" and inert on the page that is becoming inactive while focus is still inside it; focus is moved to the parent afterwards. Moving focus to the parent (or at least out of the page) before setInactive(page, true) — or relying on inert alone, which already removes the subtree from the accessibility tree and blurs focus — would avoid it.
Notes
Not present in 10.0.0-beta.31 with the same steps (the page-based menu arrived after beta.31).
Version:
@videojs/html10.0.0-rc.2 (not reproducible on 10.0.0-beta.31)Browser: Chrome 151 (macOS)
Steps to reproduce
Stock default video skin, no custom code (CDN build
@videojs/cdn@10.0.0-rc.2:video.js+video.css+media/hlsjs-video.js):1.5×(same with a Back row, and with the Audio / Captions pages).Expected
The submenu closes and focus returns to the parent row without an accessibility warning.
Actual
Chrome logs:
Focus does end up on the parent row, but for that moment the focused item is inside an
aria-hiddenpage, so assistive tech is told the focused element is hidden.Cause
setInactive()in@videojs/coredist/dev/dom/ui/menu/popup.jssetsaria-hidden="true"andinerton the page that is becoming inactive while focus is still inside it; focus is moved to the parent afterwards. Moving focus to the parent (or at least out of the page) beforesetInactive(page, true)— or relying oninertalone, which already removes the subtree from the accessibility tree and blurs focus — would avoid it.Notes
Not present in 10.0.0-beta.31 with the same steps (the page-based menu arrived after beta.31).