Skip to content

feat(presentation-role-conflict): Test img elements with empty alt#3717

Merged
WilcoFiers merged 2 commits intodevelopfrom
img-presentational-conflict
Oct 12, 2022
Merged

feat(presentation-role-conflict): Test img elements with empty alt#3717
WilcoFiers merged 2 commits intodevelopfrom
img-presentational-conflict

Conversation

@WilcoFiers
Copy link
Copy Markdown
Contributor

img elements with an empty alt attribute should not be focusable, or have global ARIA attributes. I was previously reluctant to fail for example <img alt="" aria-label="hello">, but it seems that browsers are not consistent about how to deal with this. There's an ARIA issue open on this topic here: w3c/aria#1824 (comment)

This also solves a consistency issue with ACT, which is nice. I was previously advocating to have that ACT rule updated, but now that there's a clear problem caught here, I think axe-core should fail this.

Closes issue: #3702

@WilcoFiers WilcoFiers requested a review from a team as a code owner October 12, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants