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

aria-label attribute disallowed on iframe #2945

Closed
jmedwards-indeed opened this issue May 18, 2021 · 2 comments
Closed

aria-label attribute disallowed on iframe #2945

jmedwards-indeed opened this issue May 18, 2021 · 2 comments
Labels
fix Bug fixes rules Issue or false result from an axe-core rule

Comments

@jmedwards-indeed
Copy link

Product: axe-core

Expectation: aria-label can be used to supply an accessible name for an iframe (with no explicit role and no title attribute)
Actual: Issue flagged as Critical:

Elements must only use allowed ARIA attributes
Issue Description
Ensures ARIA attributes are allowed for an element's role

Element location
iframe
Element source
<iframe class="cmp-ResponsiveVimeoVideo-iframe" src="https://player.vimeo.com/video/336812686?dnt=true" frameborder="0" allowfullscreen="" aria-label="Video player" data-ready="true"></iframe>
To solve this issue, you need to...
Fix the following:
ARIA attribute cannot be used: aria-label

Motivation: Use of aria-label on iframe appears to be acceptable under applicable standards, and some sources suggest or recommend this attribute as an alternative to title (particularly in cases where a tooltip is undesirable).


axe-core version: 4.2.0
(tested with) axe DevTools version: 4.9.3
@straker
Copy link
Contributor

straker commented May 18, 2021

Thanks for the issue. I believe this is related to #2933 and #2926 and should be fixed by #2929 and #2935

@straker straker added fix Bug fixes rules Issue or false result from an axe-core rule labels May 18, 2021
@WilcoFiers
Copy link
Contributor

Firstly, you should probably use title attributes for iframes. Unfortunately on Safari, the aria-label attribute is ignored.

Steve is right though, we introduced a bug in axe-core 4.2.0. We released a fix for it yesterday with 4.2.1 which we're rolling out everywhere in the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

3 participants