Skip to content

Latest commit

 

History

History
157 lines (103 loc) · 3.88 KB

iframe-has-name-cae760.md

File metadata and controls

157 lines (103 loc) · 3.88 KB
id name rule_type description accessibility_requirements input_aspects authors
cae760
Iframe has an accessible name
atomic
Each iframe element has an accessible name
wcag20:4.1.2
forConformance failed passed inapplicable
true
not satisfied
further testing needed
further testing needed
DOM Tree
CSS Styling
Jey Nandakumar

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 not only whitespace.

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.

<iframe title="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Passed Example 2

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

<iframe aria-label="Advertisement of tours to Great Wall of China" src="../test-assets/SC4-1-2-frame-doc.html">
</iframe>

Passed Example 3

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

<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>

Passed example 4

Accessible name is not only whitespace.

<iframe title=":-)" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed

Failed Example 1

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

<iframe name="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed Example 2

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

<iframe src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed Example 3

Empty title attribute is not valid.

<iframe title="" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed Example 4

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

<iframe aria-label="" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed Example 5

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

<iframe aria-labelledby="does-not-exist" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed Example 6

Usage of alt attribute to describe content is not valid.

<iframe alt="List of Contributors" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Failed example 7

Accessible name is only whitespace.

<iframe title=" " src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>

Inapplicable

Inapplicable Example 1

Does not apply to non iframe element.

<button>take me somewhere</button>

Inapplicable Example 2

iframe is not included in the accessibility tree.

<iframe style="display:none;" src="../test-assets/SC4-1-2-frame-doc.html"> </iframe>