Skip to content

Editor mode announcements should be off by default: they repeat what screen readers report, and live region timing can make them wrong #9962

Open

Description

@Electro-Jam

Screen reader users hear state changes on editors they are not on or near. The app sets the state, not the user, so the announcement comes from somewhere far from them. For example, an app switches an editor to edit mode while a page loads, and the user hears about it from nowhere near that editor.

This is out of context and can be disorienting. It isn't needed either, because a screen reader already reports the state when the user reaches the control.

Why

There are two different situations here, and they need different answers.

When the app changes the state

An app has two editors on one page, one editable and one read-only, and switches them as the user moves between them. The user presses Tab to move to the second editor and hears "Editor is editable". A moment later they hear "Editor is read-only". Sometimes the two come the other way round. The second message is about the editor they just left, but nothing says so.

The announcement is made whenever setEditable is called on any editor. It doesn't check which editor the user is in, and it doesn't know what caused the change. It stays quiet when the editor first mounts, but not when an app sets the state afterward, which is common while a page loads. Every call writes to the same live region, so which message is spoken, and in what order, depends on the timing of the calls.

The user can conclude that the editor they are in is read-only when it is editable. Nothing corrects that. The only way out is to ignore the announcement and listen to what the screen reader says when it lands in the text box. A screen reader already says whether a text box is editable or read-only when you reach it. So the announcement repeats what the user is told, and the live region's timing means it can be wrong.

When the user changes the state with a button

This is a different situation. In the playground, the Read-Only Mode button changes the state. Focus stays on the button, so the screen reader doesn't report the editor's new state. It seems this extension was created for a situation like that. In that case the toggle button should make the notification, because the button is where the user is, it knows the user just asked for the change, and a screen reader already reports a toggle button's state. An announcement made on every setEditable call can't know which control caused the change, or which editor the user is in.

What

  • The Read-Only Mode button reports its own new state, so the one case that needs a notification still has one.
  • The playground stops adding EditorModeAnnounceExtension, so apps that follow it don't announce state changes the user is not near.
  • The docs say that a screen reader already reports this state when the user reaches a text box, that the control that changes it should say so itself, and that this extension is only for when an app has a reason.

Shape

In the playground, the button keeps one label, "Read-only mode", and sets aria-pressed from the editor's state, so a screen reader says "pressed" or "not pressed" when it's activated. That's the usual way a toggle button reports itself. The playground's App.tsx stops adding the extension. The docs entry for it gets a short note on when to use it. No library code changes.

What this does not change

The extension, its settings and its wording. An app that already uses it sees no change.

A note on the default

The extension has a disabled setting that defaults to false, so an app that adds it is announced for every editor. I think the default should be true in a future release. Changing it changes behavior for apps that added the extension and rely on it, so I'm raising it and not changing it here.

Option A (change the default in a later release)

  • An app that added the extension and never set disabled goes quiet after the upgrade.
  • To keep the announcements it sets disabled to false.
  • A deprecation entry announces it ahead of time, with the release it lands in.

Option B (leave the default)

  • Nothing changes for any app.
  • A new app that adds it without reading the docs still gets the problem.

Neither option fully addresses the problem. The direction I'd suggest is that a control does not announce a change directly, because that can cause unnecessary reading as a page loads, and as the state changes when the user is not on or near the control. A button that reports its own state, as in the change above, is read when the user is on it.

Related: #8591

Activity

  1. krishbuilds01 commented on Nov 23, 2026

    @krishbuilds01

    Hi, I would like to work on this issue.

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