Skip to content

Add live-region-status test case (polite vs assertive status updates)#22

Open
manichandra wants to merge 1 commit into
microsoft:mainfrom
manichandra:add-live-region-status-test-case
Open

Add live-region-status test case (polite vs assertive status updates)#22
manichandra wants to merge 1 commit into
microsoft:mainfrom
manichandra:add-live-region-status-test-case

Conversation

@manichandra

@manichandra manichandra commented Jun 19, 2026

Copy link
Copy Markdown

Summary

Adds test_cases/live-region-status/, evaluating routine status messages ("Saving…",
"Saved") against the live-region urgency contract.

Motivation

Generated status indicators frequently use an assertive region (aria-live="assertive" or
role="alert") for routine updates — interrupting the screen reader — or inject the region
only when the update happens, so it is never announced. axe-core does not flag
assertive-vs-polite urgency. Maps to WCAG 2.1 SC 4.1.3 (Status Messages).

What this adds

prompt.yaml (neutral spec framing updates as routine/non-urgent), test.js (three
Requirement assertions: a live region is present on load; routine updates are polite not
assertive; the region is exposed to assistive technology), and two examples with embedded
a11y-assertions (conformant polite role=status + injected assertive-alert anti-pattern).

Validation

node_runner: the conformant example passes all three; the anti-pattern fails present-on-load
and polite-not-assertive.

Checklist

  • CLA signed (covered by the first PR)
  • Ran the evaluation harness locally
  • Follows existing test_cases conventions

Covers a routine status message and the live-region urgency contract that a static axe-core pass does not catch: a non-urgent status update must use a polite live region present on load (aria-live="polite" or role="status"), not an assertive one (aria-live="assertive" or role="alert") injected on update, which interrupts the screen reader (WCAG 2.1 SC 4.1.3 — Status Messages).

Includes prompt.yaml, test.js (three Requirement assertions), and two examples with embedded a11y-assertions expectations (a conformant polite status region and an injected assertive-alert anti-pattern). Verified with node_runner: the conformant example passes all three; the anti-pattern fails the present-on-load and polite-not-assertive assertions.
@manichandra

Copy link
Copy Markdown
Author

Hi @mfairchild365 @ckundo @slauriat — checking in on this test-case set (#20, #21, #22 — CLA signed, each validated locally with node_runner: conformant example passes, anti-pattern fails the intended assertions). Together they add coverage for three patterns the suite doesn't test yet: selection semantics in date-picker grids, popup/expanded state on listbox pickers, and assertive live-region overuse.

Happy to rebase, match any newer case conventions, or consolidate all three into a single PR if that's easier to review. Whatever's most useful for maintainers.

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.

1 participant