live-region-that-contradicts-its-role
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when an aria-live replaces the politeness the element's role already carries.
role="alert" and role="status" are live regions with a politeness built in: an alert
interrupts, a status waits for a gap. An explicit aria-live replaces that, and there are
only two values it can take — so writing one is either redundant or a reversal.
An alert made POLITE waits. A validation error, a failed save, a session about to expire — announced when the reader happens to pause, which on a form being filled in may be minutes later or never.
A status made ASSERTIVE interrupts. A live result count cutting across every keystroke, and the usual outcome is that the reader turns the page's announcements off entirely — which takes the real messages with them.
Delete the aria-live. The role already says which one was wanted, and it cannot disagree
with itself:
<div role="alert">{error}</div>
<div role="status">{count} results</div>
If the politeness genuinely has to move, drop the role and keep aria-live alone — one
source for it rather than two.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.