w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
178 stars 48 forks source link

Consider clarifying / simplifying image rules #424

Closed scottaohara closed 9 months ago

scottaohara commented 2 years ago

The img element is presently represented three times in the element table depending on if it has an alt with or without a value, or if the alt is missing.

While an img requires an alt attribute to produce valid HTML, aria-label or aria-labelledby could be used to name the image instead. These rules are more about whether the image is named or not, rather than the exact state of the alt attribute.

These rules could likely be simplified down to a single entry in the table. The allowed aria-* attributes should be reviewed in context to what the native HTML element even allows. e.g., aria-owns likely doesn't make sense as an img can have no children, so it thus cannot 'own' anything.

Thoughts @stevefaulkner @patrickhlauke ??