Repository navigation
Closed
Description
Description
The default-poster element creates a severe accessibility barrier.
<div id="default-poster" aria-label="This is a 3d Model. Activate to view in 3D!" tabindex="1" style="background-image: url("https://pathto.com/poster.png");"></div>Here's the problem:
div: No semantic meaning. Assistive technology will not apply a computedrolevalue, therefor the user will not know what this is or how to activate.div: No default keyboard functionality. There’s no way a screen reader user, sighted keyboard-only user, voice dictation user, etc, can use this.div: No focus ring. Sighted keyboard users have no visual relaying their current place on the page.div: Not keyboard focusable, leading to…tabindex=1: Since a positive value is in use, when the user starts Tabbing through they’ll end up here first, bypassing other content on the page.
The ideal markup would be:
<button type="button" id="default-poster" aria-label="Interact with [item name] 3d model" style="background-image: url("https://pathto.com/poster.png");"></button>Now…
button: Has semantic meaning. Assistive technology will apply a computedrolevalue ofbutton, giving the user notice this will manipulate something on the screen.button: Features Space and Enter default keyboard functionalitybutton: Provides the user agent default focus ring for sighted keyboard users.button: Keyboard focusable.tabindex: No longer required.
Live Demo
The markup in question exists in the Glitch demo, but is currently not in use. (Shopify is using this feature which is when I noticed the issue.)
https://model-viewer.glitch.me/
Browser Affected
- Chrome
- Edge
- Firefox
- Helios
- IE
- Safari
OS
- Android
- iOS
- Linux
- MacOS
- Windows
Versions
- model-viewer: v0.7.2
Activity
cdata commentedon Dec 2, 2019
This seems like a pretty easy fix for us to get in quickly. Thanks for the recommendation @svinkle !