Links are used as navigational elements and can be used on their own or inline with text. It's possible to use the Tab
key to navigate to the link, and the Enter
key activates the link.
This component strives to follow WCAG 2.2 (level AA) guidelines, and care must be taken to ensure this effort is maintained when the component is implemented across other projects.
alt
text should be a replacement for the link text instead of describing the image.aria-describedby
can be used to add some additional information about the link. It will be read out directly after the link text.aria-label
or aria-labelledby
, the screen reader will skip the link text completely and read out these values only.Note: It’s important to use button and link elements accurately. Controls with button-like behaviour (e.g. opening models, submitting forms) should be designed like buttons using the button element, and regular text links (e.g. going to an external page) should be designed like text links using the link element.