Last updated:

Created by:

Success Criterion:

Description

Each iframe element has an accessible name

Accessibility Requirements

This conformance rule relates to:

Test procedure

Applicability

The rule applies to iframe elements that are included in the accessibility tree.

Note: frame element is deprecated, this rule does not consider frame or frameset elements.

Expectation

Each target element has an accessible name that is non-empty.

Assumptions

Accessibility Support

There are no major accessibility support issues known for this rule.

Background

Test cases

Passed

Passed example 1

Usage of title attribute to describe the iframe content.

Code Snippet:
 <iframe title="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
 
Example Output: Open in a new tab/ window

Passed example 2

Usage of aria-label attribute to describe the iframe content.

Code Snippet:
 <iframe aria-label="Advertisement of tours to Great Wall of China" src="../test-assets/SC4-1-2-frame-doc.html" >
</iframe>
 
Example Output: Open in a new tab/ window

Passed example 3

Usage of aria-labelledby attribute to describe the iframe content.

Code Snippet:
 <div id="frame-title-helper">Watch highlights of the Worldcup</div>
<iframe aria-labelledby="frame-title-helper" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
 
Example Output: Open in a new tab/ window

Failed

Failed example 1

Usage of name attribute to describe the iframe content is not valid.

Code Snippet:
 <iframe name="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html" >
</iframe>
 
Example Output: Open in a new tab/ window

Failed example 2

iframe with no title, aria-label or aria-labelledby attribute to describe content is not valid.

Code Snippet:
 <iframe src="../test-assets/SC4-1-2-frame-doc.html" >
</iframe>
 
Example Output: Open in a new tab/ window

Failed example 3

Empty title attribute is not valid.

Code Snippet:
 <iframe title="" src="../test-assets/SC4-1-2-frame-doc.html" >
</iframe>
 
Example Output: Open in a new tab/ window

Failed example 4

Empty aria-label attribute to describe the frame content is not valid.

Code Snippet:
 <iframe aria-label="" src="../test-assets/SC4-1-2-frame-doc.html" >
</iframe>
 
Example Output: Open in a new tab/ window

Failed example 5

Usage of non existing aria-labelledby reference element to describe the iframe content is not valid.

Code Snippet:
 <iframe aria-labelledby="does-not-exist" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
 
Example Output: Open in a new tab/ window

Failed example 6

Usage of alt attribute to describe content is not valid.

Code Snippet:
 <iframe alt="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
 
Example Output: Open in a new tab/ window

Inapplicable

Inapplicable example 1

Does not apply to non iframe element.

Code Snippet:
 <button>take me somewhere</button>
 
Example Output: Open in a new tab/ window

Inapplicable example 2

iframe is not included in the accessibility tree.

Code Snippet:
 <iframe style="display:none;" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>
 
Example Output: Open in a new tab/ window

Glossary

Included in the accessibility tree

Elements included in the accessibility tree of platform specific accessibility APIs. Elements in the accessibility tree are exposed to assistive technologies, allowing users to interact with the elements in a way that meet the requirements of the individual user.

The general rules for when elements are included in the accessibility tree are defined in the core accessibility API mappings. For native markup languages, such as HTML and SVG, additional rules for when elements are [included in the accessibility tree][] can be found in the HTML accessibility API mappings and the SVG accessibility API mappings.

Note: Users of assistive technologies might still be able to interact with elements that are not included in the accessibility tree. An example of this is a focusable element with an aria-hidden attribute with a value of true. Such an element could still be interacted with using sequential keyboard navigation regardless of the assistive technologies used, even though the element would not be included in the accessibility tree.

Accessible Name

The programatically determined name of a user interface element that is included in the accessibility tree.

The accessible name is calculated using the accessible name and description computation.

For native markup languages, such as HTML and SVG, additional information on how to calculate the accessible name can be found in HTML Accessibility API Mappings 1.0, Accessible Name and Description Computation and SVG Accessibility API Mappings, Name and Description.

Non-empty text string

A string of characters (text) is considered “non-empty” if it contains 1 or more characters that are contained within any of the following unicode categories:

  • Ll: Letter, Lowercase
  • Lu: Letter, Uppercase
  • Lt: Letter, Titlecase
  • Lo: Letter, Other
  • Lm: Letter, Modifier
  • Nd: Number, Decimal Digit

For more details on unicode categories, check out www.fileformat.info/info/unicode/category/

Test Aspects

Test aspects are defined as part of the ACT Rules format 1.0.
  • DOM Tree

  • CSS Styling

Contribute






GitHub

Contributing is open to anyone. We welcome any new issues or pull requests for changes. Auto WCAG Rules has conference calls every 4 weeks. If you are interested in becoming an active contributor or reviewer, we ask that you join the Auto WCAG Rules community group through the W3C Website. This requires setting up a W3C account, may require approval by the organization you work for if they are a W3C member.

Learn more about contributing to Auto WCAG Rules Join the Auto WCAG Rules community group now!