Ensure that screen readers aren’t reading out iframes to users when there’s no meaningful content in the iframe.
Why this matters
How to implement
Ensure that each
<iframe> that should be hidden has a hidden attribute or has a CSS display:none property set.
For additional reading, see Hush Sweet iFrame by HTML Accessibility.
How to test
- Inspect the code for each iframe that should be hidden and confirm that it has an
aria-hiddenattribute or has a CSS
- Note that hiding the iframe does not invalidate the need to test Do all iFrames have unique titles? because if the “hidden” state changes due to a bug, the iframe will need to have a title.
No automated testing for this issues exists at this time. (An HTML validator might be able to tell you if the
aria-hidden attribute was declared incorrectly but can’t programmatically identify that the
<iframe> should be hidden.