Skip to content

Default poster element creates accessibility barrier #905

Closed

Description

@svinkle

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(&quot;https://pathto.com/poster.png&quot;);"></div>

Here's the problem:

  • div: No semantic meaning. Assistive technology will not apply a computed role value, 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(&quot;https://pathto.com/poster.png&quot;);"></button>

Now…

  • button: Has semantic meaning. Assistive technology will apply a computed role value of button, giving the user notice this will manipulate something on the screen.
  • button: Features Space and Enter default keyboard functionality
  • button: 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

  1. cdata commented on Dec 2, 2019

    @cdata
    Contributor

    This seems like a pretty easy fix for us to get in quickly. Thanks for the recommendation @svinkle !

  2. added this to the v0.8.0 milestone on Dec 2, 2019
  3. self-assigned this
    on Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arc: a11yarc: interactiontype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions