Skip to content

Heading role and level for non-sensing text #266

Open

Description

@samitbasu

Assistive technology should hear a Markdown heading (or any heading-like text) as a heading with its level, as HTML's <h1>–<h6>.

Today: NodeHandle::role requires a node that senses, and a text node's text is announced through its selectable label as Role::Label. A heading made with b.spans(..) therefore reads as plain text.

To do: a way to give non-sensing text a role and a level (accesskit Role::Heading + set_level), e.g. a text-node role that the label selection's widget info carries, without making the node sense the pointer. The Markdown widget (#254) then marks its headings.

Found while building #254; part of the docs-site accessibility work (#259).

Activity

  1. added
    post-0.1
    on Nov 16, 2026
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

    post-0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions