Skip to content

Prepopulate ARIA live region with nonbreaking space - #346

Merged
sclower merged 4 commits into
mainfrom
sclower/prepopulate-live-region
Mar 16, 2026
Merged

Prepopulate ARIA live region with nonbreaking space#346
sclower merged 4 commits into
mainfrom
sclower/prepopulate-live-region

Conversation

@sclower

@sclower sclower commented Mar 12, 2026

Copy link
Copy Markdown

THis fixes a problem where screen readers weren't registerying the first region change made to a math field, e.g. when typing.

sclower added 3 commits March 12, 2026 11:20
THis fixes a problem where screen readers weren't registerying the first region change made to a math field, e.g. when typing.
@sclower
sclower requested a review from timstallmann March 13, 2026 18:38
Comment thread src/services/aria.ts

// For the first message only, use a 50ms delay to ensure the empty live region
// is registered with screen readers before adding content. Screen readers need
// actual time (not just a different execution context) to process the empty element.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if we get multiple messages coming in within the first 50ms? it seems like they might then come in out of order

@sclower
sclower requested a review from timstallmann March 16, 2026 15:41

@timstallmann timstallmann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@sclower
sclower merged commit 2ee28bc into main Mar 16, 2026
3 checks passed
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.

2 participants