-
-
Notifications
You must be signed in to change notification settings - Fork 636
jsx-a11y/iframe-has-title
: title should not be required for hidden frames
#946
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
Comments
I'm ready to submit a PR to fix it if you agree that it is undesired behaviour |
Why would aria-hidden mean a user wouldn’t be able to hover their mouse cursor over it? |
Good question, btw. Since aria-hidden means that we do not want iframe to be interactable for screen readers, I don’t think it’s a good idea to force any accessibility attributes on it. Don’t you think so? Title for an element that is hidden from assistive techs seems to be redundant According to MDN, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#accessibility_concerns:
Negative tabIndex or inert is required for consistency because:
|
Things with a title pop up a tooltip when you hover over them, but maybe that's not the case if they're aria-hidden, i'd have to test it out. |
Hi there adding a comment here from Deque - the creators of axe-core: Hidden frames should have a title of "Intentionally blank" ContextSource: https://dequeuniversity.com/tips/provide-iframe-titles
![]() |
Hey!
Let's consider a case when we have some technical iframe on the page (e.g. collect some user actions). According to a11y rules we will add
aria-hidden=true
to hide it from assistive techs andtabIndex=-1
to exclude it from keyboard access.In this case eslint plugin still requires
title
attribute but it seems to be redundant.Please let me know, what do you think about this case :)
The text was updated successfully, but these errors were encountered: