Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider clarifying / simplifying image rules #424

Closed
scottaohara opened this issue Jul 6, 2022 · 0 comments · Fixed by #453
Closed

Consider clarifying / simplifying image rules #424

scottaohara opened this issue Jul 6, 2022 · 0 comments · Fixed by #453
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements Clarification needed Revise or expand the information provided

Comments

@scottaohara
Copy link
Member

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 ??

@scottaohara scottaohara added Allowed roles Pertaining to the allowed roles of HTML elements Allowed aria-* attributes Clarification needed Revise or expand the information provided labels Jul 6, 2022
@scottaohara scottaohara added this to the ARIA in HTML 1.2 milestone Jul 6, 2022
scottaohara added a commit that referenced this issue Mar 16, 2023
This PR closes #424 and #452

Description of changes to come....
scottaohara added a commit that referenced this issue Oct 3, 2023
Clarify and consolidate img ARIA allowances

This PR closes #424 and #452

* clarify when img role is allowed
* add meter to allowed role for img
* similar to progressbar, meter should thus also be allowed.
* fix img lacking alt allowance
* update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements Clarification needed Revise or expand the information provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant