Skip to content

Announcer (aria mode): live-region text is deleted after 100 ms, so on-device screen readers never read it #31

@ines-sanluis

Description

@ines-sanluis

Environment

  • @solidtv/solid 1.2.2
  • Platform: LG webOS TV, Audio Guidance (the OS screen reader) enabled
  • App is a WebGL <canvas> Lightning app (no DOM UI), using Announcer with aria = true

Summary

In ARIA mode (Announcer.aria = true), Announcer.speak correctly injects the label into the #aria-parent aria-live="assertive" region — but then deletes those nodes 100 ms later and moves focus back to the canvas.

On the TV screen reader, that teardown fires before the reader has finished (often before it has started)
speaking the label, so nothing is announced, even though the DOM mutates exactly as
expected.

The hard-coded 100 ms is too aggressive for TV readers.

Where

src/primitives/announcer/speech.ts, in focusElementForAria():

// Cleanup
setTimeout(() => {
  ariaLabelPhrases = [];
  cleanAriaLabelParent();   // removes the spans that were just injected
  focusCanvas();                 // moves focus back to the canvas
}, 100);

(The cancel() path in speakSeries does the same immediate clear + focusCanvas().)

Steps to reproduce

On a webOS TV with Audio Guidance on, drive Announcer.speak(['Hello', 'button']) in
aria mode on focus change. Observe: the spans appear in #aria-parent and disappear ~100
ms later; nothing is spoken.

Proposed fix

Don't tear the content down on a timer. Either of:

  1. Replace-on-next-write (preferred): leave the injected label in the region until the
    next announcement replaces it. The region naturally holds only the current label, and
    the reader is never interrupted.
  2. Make the teardown configurable: expose the cleanup delay (and whether to
    focusCanvas()), e.g. Announcer.ariaCleanupDelay, defaulting to something safe
    (≥ a few seconds) or 0/off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions