Open geotrev opened 1 year ago
I'd suggest never referring to w3schools - it's not a good resource.
MDN doesn't indicate in any way that it's primarily for forms: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output Certainly there's a form
property but the "if any" means it's intended for use outside of forms as well.
@ljharb Regardless, I still think the div
/role
usage being flagged is valid in this case given existing pattern documentation?
I've tagged in @jessebeach on that one :-)
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:
And gives the following output:
Another example for SVGs:
With similar warning:
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.