Open
Description
I've been updating a few pieces of code after updating to include this rule, and I'm finding that certain usages are flagged possibly incorrectly?
For e.g., I have code like so that is used as a global page alert element:
<div role='status'>...</div>
<div role='alert'>...</div>
And gives the following output:
Use <output> instead of the ["status"/"alert"] role to ensure accessibility across all devices.
Another example for SVGs:
<svg role='img'>...</svg>
With similar warning:
Use <img> instead of the "img" role to ensure accessibility across all devices.
Which is strange because (this isn't accurate)<output>
is primarily used in forms, unlike alert and status containers which are often treated as live regions or focus trapped containers.
I did some digging and both live regions and SVG images appear to be valid in these contexts.
Metadata
Metadata
Assignees
Labels
No labels