Creating links using role=link
Authoring Practice Design Patten for Link
Note: When using HTML use the <a> element. It is recommended that authors not re-purpose other elements to create links.
Example Links
| Technique | Link | Accessibility Features |
|---|---|---|
span element with text content |
W3C website
|
|
img element |
|
|
| Content |
|
|
| Background Image |
|
|
Keyboard Support
| Key | Function |
|---|---|
| Enter/Return | Activate link |
ARIA Roles, Properties and States
| Role | Property/State | Component | Usage |
|---|---|---|---|
| link | span | Identify element with the link behavior | |
| aria-label | span | Define accessible name for link. |
Source Code
HTML Code
HTML source code is generated by scripting using ID references.