19. Frames and iFrames
- WCAG SC 4.1.2 Name, Role, Value – For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.
Test Method Rationale
While users with vision can recognize the structure presented by frames and iframes, users without vision rely on programmatic elements to determine their content. This test method determines the adequacy of the code to describe the contents of any
<iframe> for Assistive Technology.
Limitations, Assumptions, or Exceptions
- In HTML5 the
<frame>element is marked as obsolete. The
<iframe>element remains part of the HTML5 specification. While the
<frame>element has been deprecated in HTML5, testers may still encounter web pages and/or web applications with code that, while outdated, can and should still be accessible.
- The combination of accessible name and accessible description of an
<iframe>is its text alternative.
19.1 Test Procedure for Frames
Baseline Test ID: 19.1-FrameTitle
- Check if each
<frame>has a title attribute that describes its content. [SC 4.1.2]
If any of the above checks fail, then Baseline Test 19.1-FrameTitle fails.
19.2 Test Procedure for iFrames
Baseline Test ID: 19.2-iFrameName
- Check that the combination of the accessible name and accessible description is not empty. [SC 4.1.2]
- Check that the non-empty combination of accessible name and description for each
<iframe>describes its content. [SC 4.1.2]
If any of the above checks fail, then Baseline Test 19.2-iFrameName fails.
Advisory: Tips for streamlined test processes
WCAG 2.0 Techniques
The following techniques and/or common failures were considered when developing this test procedure for this baseline requirement: