SIA-R11Links have an accessible name

Accessibility requirements

This rule tests conformance of the following accessibility requirements:

Description

This rule checks that links, such as <a> elements, <area> elements, and elements with a role=region attribute, have an accessible name.

Applicability

This rule applies to every element in the HTML namespace with a semantic role of link where the element is included in the accessibility tree.

Expectations

  1. The element has an accessible name that is not empty.

Assumptions

This rule makes no assumptions.

Accessibility support

This rule has no known accessibility support concerns.

Examples

Passed

These elements all have a semantic role of link and an accessible name and therefore pass the rule:

<a href="http://www.w3.org/WAI">Web Accessibility Initiative (WAI)</a>
<div role="link"><img src="#" aria-label="This is a link" /></div>
<a href="http://www.w3.org/WAI" title="This is a link"><img src="#" /></a>

Failed

This link has no accessible name and therefore fails the rule:

<a href="http://www.w3.org/WAI"></a>

Inapplicable

This element does not have a semantic role of link and is therefore inapplicable:

<a href="http://www.w3.org/WAI" role="button">
    Web Accessibility Initiative (WAI)
</a>

This element is not included in the accessibility tree and is therefore inapplicable:

<a href="http://www.w3.org/WAI" style="display: none;"><img src="#" /></a>

Acknowledgments

This document includes material copied from or derived from https://act-rules.github.io/rules/c487ae/. Copyright © 2021 W3C® (MIT, ERCIM, Keio, Beihang).