Skip to content

CI only: full matrix run for the heading announcer plain-text fix - #7

Open
Electro-Jam wants to merge 482 commits into
mainfrom
ci-heading-plain-text
Open

Electro-Jam wants to merge 482 commits into
mainfrom
ci-heading-plain-text

Conversation

@Electro-Jam

Copy link
Copy Markdown

Not for merge. Opened purely to trigger the test matrix on our own runners, so the full plain-text / webkit / macOS / production-build jobs run before the fix goes to meta#8908.

mayrang and others added 30 commits May 19, 2026 03:49
…cal-plain-text] Feature: Move triple click selection handling to NormalizeTripleClickSelectionExtension (meta#8520)

Co-authored-by: Claude <noreply@anthropic.com>
…pe` (meta#8517)

Co-authored-by: Bob Ippolito <bob@redivi.com>
Co-authored-by: Claude <noreply@anthropic.com>
…links (meta#8531)

Co-authored-by: Claude <noreply@anthropic.com>
…-indent (meta#8536)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… Allow null Tokenizer.defaultLanguage to preserve markdown ``` round-trip (meta#8553)
…ncile (meta#8564)

Co-authored-by: Claude <noreply@anthropic.com>
…tils][lexical-playground] Feature: Generalize DOMSlot and add DOMRenderExtension override surface (meta#8519)

Co-authored-by: Bob Ippolito <bob@redivi.com>
Co-authored-by: Claude <noreply@anthropic.com>
…ent-moved elements (meta#8569)

Co-authored-by: Claude <noreply@anthropic.com>
…ed process (meta#8557)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
…sions (meta#8546)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
…errides (disabledForEditor/disabledForSession) (meta#8575)

Co-authored-by: Claude <noreply@anthropic.com>
potatowagon and others added 30 commits July 20, 2026 16:10
…ode-type collision (meta#8640) (meta#8867)

Co-authored-by: potatowagon <potatowagon@users.noreply.github.com>
… build (meta#8861)

Co-authored-by: Claude <noreply@anthropic.com>
…ed as own static (meta#8867 follow-up) (meta#8869)

Co-authored-by: potatowagon <potatowagon@users.noreply.github.com>
…ators on Firefox (meta#8862)

Co-authored-by: Bob Ippolito <bob@redivi.com>
…fined col widths (meta#8850)

Co-authored-by: Bob Ippolito <bob@redivi.com>
Co-authored-by: Claude <noreply@anthropic.com>
…aky webkit undo tests (meta#8874)

Co-authored-by: Claude <noreply@anthropic.com>
…gisterNodeTransform generics (meta#8877)

Co-authored-by: Bob Ippolito <bob@redivi.com>
…DOM (meta#8882)

Co-authored-by: Shaï Halimi <shai.halimi@infomaniak.com>
…uts (meta#8879)

Co-authored-by: Bob Ippolito <bob@redivi.com>
… at start of root (meta#8886) (meta#8887)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Lexical GitHub Actions Bot <>
…appen

Adds HeadingAnnounceExtension, announcing through the existing
AriaLiveRegionExtension sink:

  block becomes a heading  -> 'Heading level 2'
  heading stops being one  -> 'Heading level 2 removed'

The markdown heading shortcut is a number-sign character followed by the space
bar. Pressing space triggers the transformation: both keystrokes are consumed
and the block type changes. For a sighted user that is obvious - the characters
disappear and the text jumps to heading size. For a screen-reader user there is
no signal at all, so the reasonable conclusion is that the document now contains
a number sign, a space, and whatever is typed next. It does not.

And when the shortcut IS intended, the only way to confirm the level today is to
move the caret out of the block and arrow back in, mid-sentence, every time.

Follows HistoryAnnounceExtension: defineExtension + namedSignals + safeCast,
depends on AriaLiveRegionExtension, config {created, destroyed, disabled} with
%s substituted for the level so the strings stay translatable, and a disabled
signal gated from an effect so a disabled announcer registers no listener.

RichTextExtension is declared as a dependency because it registers HeadingNode:
attaching a mutation listener for a node the editor has not registered throws.
This matches how AutoLinkExtension depends on LinkExtension, and
CheckListExtension on ListExtension.

Note: a level change - typing "## " straight after "# ", with no text entered -
fires both a removal and a creation. In the first block of the document the
removal is what reached the live region, so it announced "Heading level 1
removed" instead of the new level. Announce the creation; only say "removed"
when nothing replaced it.

A destroyed node is gone from the current editor state, so its level is read
from the prevEditorState that registerMutationListener provides.

Silent otherwise. Typing inside a heading, moving the caret through it, and
deleting text while the heading survives do not announce - announcing on every
keystroke would make a heading impossible to type into.

Enabled in the playground alongside HistoryAnnounceExtension and
EditorModeAnnounceExtension.

Note: HeadingNode lives in @lexical/rich-text, so this adds that as a dependency
of @lexical/a11y - the first dependency beyond @lexical/extension,
@lexical/utils and lexical. See the PR description for the placement question.

Tests: seven cases in
packages/lexical-a11y/src/__tests__/unit/HeadingAnnounceExtension.test.ts,
following the structure of the existing HistoryAnnounceExtension tests. One
asserts silence while editing inside a heading; one covers a level change.
…is announced

Announcing a heading split the surrounding edit into two undo steps, so
a single undo took back only half of it. After a Markdown import the
document stayed as rich text instead of returning to the Markdown code
block, and Markdown.spec.mjs "can convert markdown text into rich text"
failed on its undo assertion.

The announcer read the new heading level with editor.read(). That call
flushes any pending update before it reads, and a mutation listener runs
while an update is being committed - so reading from inside one ended
the update early and began a second.

Reading the committed editor state directly avoids the flush. The
removal branch alongside it already did this, through
prevEditorState.read().

Markdown.spec.mjs passes in full, as do the @lexical/a11y unit tests.
…nto the editor

Adding the heading announcer to a plain text editor stopped it building
at all - "extension @lexical/plain-text conflicts with
@lexical/rich-text" - because the announcer declared rich text as a
dependency. Rich text is now a peer, so it is set up first when present
and nothing is forced in when it is not, and the announcer registers
nothing when the editor has no headings to watch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.