Skip to content

Separate aria-live region #461

Closed

Description

@svinkle

Description

As stated in #460, pairing aria-label with the aria-live attribute on the canvas element may not have the best support. Ideally there would be a separate, dedicated aria-live region that would be used for all update announcements.

Ensuring the element is available on page load is also required for best support as some assistive technology do not recognize a dynamically generated aria-live region after initial page load.

Recommendation: create a dedicated aria-live region, sending all announcement strings to this element. Set the element role as “status” as this will feature the most accurate semantic meaning for this element.

Wrapping the “status” element with a parent element with a note attached via aria-label will help to provide the user with context on what they're interacting with when they inevitably find the announcement element when navigating via virtual cursor or swipe gestures.

<div role="region" aria-label="Live announcements">
  <span role="status" class="visuallyhidden">
    View from stage back
  <span>
</div>

Live Demo

  1. Go to <model-viewer> with Edge on Windows
  2. Load up JAWS screen reader
  3. Tab to the canvas content

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • Helios
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

Versions

  • model-viewer: v0.1.1

Activity

  1. cdata commented on Apr 2, 2019

    @cdata
    Contributor

    Thanks for the feedback here!

    The intended effect of our current approach (using aria-live and aria-label on the <canvas>) is that live updates will only be read (if they are read at all) when the related <model-viewer> is focused.

    Elements with role="status" seem to have their updates read by VoiceOver / Chrome regardless of where they appear on the page, or whether they are focused. This is why we only use a single, global status element for all <model-viewer> elements.

    Can you recommend a good way for us to thread this needle?

  2. svinkle commented on Apr 3, 2019

    @svinkle
    Author

    The intended effect of our current approach (using aria-live and aria-label on the <canvas>) is that live updates will only be read (if they are read at all) when the related <model-viewer> is focused

    Agreed. With this recommended change, when the canvas element is in focus and the user interacts with the model, instead of updating the aria-label, update the proposed status element instead. This will have the same affect but with better support across technologies.

    The status element could be a sibling to the canvas, or anywhere within <model-viewer>. Perhaps we could add a blur event where the status element is cleared of any text.

  3. cdata commented on Apr 3, 2019

    @cdata
    Contributor

    It sounds like the actionable work here might be to move 100% of our live announcements to go through the status element that we currently use to announce the loading status. This would probably entail refactoring LoadingStatusAnnouncer as a generalized status announcer (which is something we had talked about doing anyway) decoupled from loading state.

  4. PeterSaathoff-Harshfield commented on Jan 6, 2022

    @PeterSaathoff-Harshfield

    This looks like a good proposal to me, though I think some of the announcements, specifically around loading, should be toned down a bit. In the context I've seen this viewer, they seemed to give a bit too much information about loading. For example, I often see a page with one model, and "all 3d models in the page have loaded" is announced. At most, I'd recommend an announcement that just says "loading" or "loaded". Concise labels/announcements are important.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions