Add live-region-status test case (polite vs assertive status updates)#22
Open
manichandra wants to merge 1 commit into
Open
Add live-region-status test case (polite vs assertive status updates)#22manichandra wants to merge 1 commit into
manichandra wants to merge 1 commit into
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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