A link to a document should say so
Rule
link-download-format· Links & buttons · impact moderate · Static + live
Why it matters
A link that opens a PDF or spreadsheet instead of a web page changes the user’s context: a new application may take over, and screen-reader users can land in a document with entirely different navigation. When the link text gives no warning, nothing distinguishes it from an ordinary page link until it is too late.
How to fix
Put the format in the accessible name — "Annual report (PDF)" — rather than only in the href. Adding the file size helps too. The download attribute alone is not announced.
Example
<a href="/annual-report.pdf">Annual report</a>
<a href="/annual-report.pdf">Annual report (PDF)</a>
Example
<a href="/data/sales.xlsx">Sales figures</a>
<a href="/data/sales.xlsx">Sales figures (Excel)</a>
WCAG success criteria
2.4.4 Link Purpose (In Context) — Level A
The purpose of each link should be clear from its text (or its programmatically-associated context).
Standards
This rule contributes to the following standards:
WCAG A EN 301 549
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.2.4.4 |