You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1>Using aria-labelledby to provide a text alternative for non-text content</h1>
32
+
<sectionid="important-information">
33
+
<h2>Important Information about Techniques</h2>
34
+
<p>See <ahref="https://waic.jp/docs/WCAG21/Understanding/understanding-techniques">Understanding Techniques for WCAG Success Criteria</a> for important information about the usage of these informative techniques and how
35
+
they relate to the normative WCAG 2.1 success criteria. The Applicability section
36
+
explains the scope of the technique, and the presence of techniques for a specific
37
+
technology does not imply that the technology can be used in all situations to create
38
+
content that meets WCAG 2.1.
39
+
</p>
40
+
</section>
41
+
<main>
42
+
<sectionid="applicability">
43
+
<h2>Applicability</h2>
44
+
<p>This technique applies to HTML with <ahref="https://www.w3.org/TR/wai-aria/">Accessible Rich Internet Applications (WAI-ARIA)</a>.
45
+
</p>
46
+
<p>This technique relates to <span><ahref="https://waic.jp/docs/WCAG21/Understanding/non-text-content">Success Criterion 1.1.1: Non-text Content</a> (Sufficient)</span>.
47
+
</p>
48
+
</section>
49
+
<sectionid="description">
50
+
<h2>Description</h2>
51
+
<p>The purpose of this technique is to provide a short description for an element that
52
+
can be read by assistive technologies (AT) by using the <codeclass="att">aria-labelledby</code> attribute. The <codeclass="att">aria-labelledby</code> attribute associates an element with text that is visible elsewhere on the page by
53
+
using an ID reference value that matches the ID attribute of the labeling element.
54
+
Assistive technology such as screen readers use the text of the element identified
55
+
by the value of the <codeclass="att">aria-labelledby</code> attribute as the text alternative for the element with the attribute.
<h3>Example 1: Providing a short description for a complex graphic</h3>
62
+
<p>This example shows how to use the <codeclass="att">aria-labelledby</code> attribute to provide a short text description for a read-only complex graphic of
63
+
an star rating pattern; the graphic is composed of several image elements. The text
64
+
alternative for the graphic is the label, visible on the page beneath the star pattern.
<div id="star_id">4 of 5</div></pre><pclass="working-example">Working example: <ahref="../../working-examples/aria-labelledby-description-complex-graphic/">Providing a short description for a complex graphic</a>.
74
+
75
+
</p>
76
+
</section>
77
+
</section>
78
+
<sectionid="resources">
79
+
<h2>Resources</h2>
80
+
<p>Resources are for information purposes only, no endorsement implied.</p>
<ahref="https://www.w3.org/TR/html-aapi/#accessible-name-and-description-calculation">HTML to Platform Accessibility APIs Implementation Guide: Accessible Name and Description
90
+
Calculation</a>
91
+
92
+
</li>
93
+
94
+
<li>
95
+
<ahref="https://www.w3.org/TR/accname/">Accessible Name and Description Computation</a>
96
+
97
+
</li>
98
+
99
+
</ul>
100
+
</section>
101
+
<sectionid="related">
102
+
<h2>Related Techniques</h2>
103
+
<ul>
104
+
105
+
<li><ahref="../html/H37">H37: Using alt attributes on img elements</a></li>
106
+
107
+
<li><ahref="../failures/F65">F65: Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative
108
+
on img elements, area elements, and input elements of type "image"</a></li>
109
+
110
+
</ul>
111
+
</section>
112
+
<sectionid="tests">
113
+
<h2>Tests</h2>
114
+
<sectionclass="procedure" id="procedure">
115
+
<h3>Procedure</h3>
116
+
117
+
<ol>
118
+
119
+
<li>Examine each element where the <codeclass="att">aria-labelledby</code> attribute is present and the element does not support the <codeclass="att">alt</code> attribute.
120
+
</li>
121
+
122
+
<li>Check whether the value of the <codeclass="att">aria-labelledby</code> attribute is the id of an element on the web page.
123
+
</li>
124
+
125
+
<li>Determine that the text of the element identified by the <codeclass="att">aria-labelledby</code> attribute accurately labels the element, provides a description of its purpose, or
0 commit comments