- WCAG SC 2.4.4 Link Purpose (In Context) – The purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context, except where the purpose of the link would be ambiguous to users in general.
- WCAG2 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
Links and buttons, including scripted elements, must have meaningful text (either directly associated or available in context) that describe its purpose or function. In order for associated text to be available to assistive technologies, the information must be determinable programmatically.
Limitations, Assumptions, Exceptions
- From Understanding SC 2.4.4: There may be situations where the purpose of the link is supposed to be unknown or obscured. For instance, a game may have links identified only as door #1, door #2, and door #3. This link text would be sufficient because the purpose of the links is to create suspense for all users.
- The combination of an element’s accessible name and accessible description is its text alternative.
14.1 Test Procedure for Link Purpose (In Context)
Baseline Test ID: 14.1-LinkPurpose
All links including those that are scripted elements and assigned a role of a link.
- Check that the combination of accessible name and accessible description is not empty. [SC 4.1.2]
- Check that the purpose of each link can be determined from any combination of the link text, accessible name and accessible description, and preceding page context (same paragraph, list, or table cell as the link or in a table header cell that is associated with the table cell that contains the link). [SC 2.4.4]
If any of the above checks fail, then Baseline Test 14.1-LinkPurpose fails.
Advisory: Tips for streamlined test processes
- In cases where the link is to a document or a web application, the name of the document or web application would be sufficient to describe the purpose of the link (which is to take the user to the document or web application).
WCAG 2.0 Techniques
The following sufficient techniques and/or common failures were considered when developing this test procedure for this baseline requirement:
- G91: Providing link text that describes the purpose of a link
- G53: Identifying the purpose of a link using link text combined with the text of the enclosing sentence
- ARIA7: Using aria-labelledby for link purpose
- ARIA8: Using aria-label for link purpose
- H77: Identifying the purpose of a link using link text combined with its enclosing list item
- H79: Identifying the purpose of a link in a data table using the link text combined with its enclosing table cell and associated table header cells
- F89: Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link