Link button
LinkButton allows users to navigate to another destination while presenting the navigation affordance with button styling.
Also known as: Anchor Button, Button Link, Link CTA
| Salt package | @salt-ds/core |
|---|
- Use a label that identifies the destination. If you add
aria-labeloraria-labelledbyfor extra context, include the visible label text in the accessible name. - Do not rely on color alone to show that a link button navigates. Keep the default underline unless the surrounding pattern already provides another visible non-color cue, such as a navigation list, toolbar, or group of related links.
- When a link button contains an icon and text, pass
aria-hiddento the icon so screen readers do not announce duplicate content. - When a link button contains only an icon, add an
aria-labelthat identifies the destination and passaria-hiddento the icon. ATooltipdoes not replace this accessible name. - Add a
Tooltipwith the same destination text to help users who may not recognize the icon. Use visible link text instead when the icon or destination may be unfamiliar. - When
target="_blank"is set,LinkButtonautomatically adds a visual icon and visually hidden text that announces the new tab. Keep the default icon unless your custom content already provides another visible new-tab cue.
| Key | Function |
|---|---|
| Tab | Moves focus to the link button. |
| Shift + Tab | Moves focus to the previous focusable element. |
| Enter | If the link button has an |