Skip to content

How should canvas EditContext be made accessible? #139

Open

Description

@ltenmoz

See also: #136. It's not clear how exactly canvas-based EditContext editors should be made accessible to assistive technologies such as screen readers.
In theory, the EditContext.text could be exposed to screen readers, however, I don't know if that's a good idea since it's missing information about formatting and structure (paragraphs, links, etc.). So some kind of alternative content is needed. However, screen readers often announce the selected text, so that information needs to be exposed somehow. Web apps could use the SpeechSynthesis API to announce things directly, but that requires a lot of extra work to rebuild all the functionality that already exists (using arrow keys to change what is being announced, etc.) and wouldn't necessarily work the same as the software the user is used to.

So I'm thinking, perhaps the best solution is to synchronize the DOM selection in the alternative content with the selection in the EditContext, while keeping the EditContext focused. Something like this: https://ltenmoz.github.io/editcontext-canvas/index.html. However, this seems to have some issues. For example, when using NVDA on Windows, the selection isn't announced when new text is selected. Also, if PageUp/PageDown is pressed, the DOM selection leaves the editor (on Chromium) since it's not preventDefaulted. So if this is the correct approach, browsers need to

  • Ensure that screen readers interact well with the selection being moved by scripts with an EditContext editor focused.
  • Disable selection moving shortcuts for canvas EditContext, in case there are some that the web app doesn't preventDefault (so that the selection in the alternative content doesn't get out of sync with the selection in the EditContext)

Another potential issue: WebKit and Chromium don't lay out canvas fallback content, which is an issue for assistive technologies which need to know the position of the text. Not sure what the best solution is there.

Activity

  1. added
    Agenda+Queue this item for discussion at the next WG meeting
    on Jul 24, 2026
  2. smaug---- commented on Aug 13, 2026

    @smaug----
  3. dandclark commented on Sep 9, 2026

    @dandclark
    Contributor

    Notes from the August call:

    Olli has contributed a pull request improving the relevant explainer.
    Dan appreciated the contribution and agreed that this was an important
    missing piece in both the explainer and the specification.
    Dan's main feedback was that the explanation should be included directly
    in the EditContext specification as a non-normative section, rather than
    remaining only in the explainer, because the information is sufficiently
    important to warrant inclusion in the spec.
    Since the proposed text is non-normative, Dan did not think a formal
    group resolution was necessary. He encouraged interested participants to
    review the pull request and provide feedback.

  4. added
    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.
    on Sep 16, 2026
  5. removed
    Agenda+Queue this item for discussion at the next WG meeting
    on Oct 5, 2026
  6. siusin commented on Oct 8, 2026

    @siusin
    Contributor
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

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions