Skip to content

Commit

Permalink
[docs] Expand on a11y section for Material UI Link component (#32839)
Browse files Browse the repository at this point in the history
  • Loading branch information
TKrishnasamy committed Aug 15, 2022
1 parent 025e6fb commit e27db4d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/data/material/components/links/links.md
Expand Up @@ -51,5 +51,16 @@ Here is a [more detailed guide](/material-ui/guides/routing/#link).
Instead, use [specific descriptions](https://developers.google.com/web/tools/lighthouse/audits/descriptive-link-text).
- For the best user experience, links should stand out from the text on the page. For instance, you can keep the default `underline="always"` behavior.
- If a link doesn't have a meaningful href, [it should be rendered using a `<button>` element](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md).
The demo below illustrates how to properly link with a `<button>`:

{{"demo": "ButtonLink.js"}}

### Keyboard accessibility

- Interactive elements should receive focus in a coherent order when the user presses the <kbd class="key">Tab</kbd> key.
- Users should be able to open a link by pressing <kbd class="key">Enter</kbd>.

### Screen reader accessibility

- When a link receives focus, screen readers should announce a descriptive link name.
If the link opens in a new window or browser tab, add an [`aria-label`](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA8) to inform screen reader users—for example, _"To learn more, visit the About page which opens in a new window."_

0 comments on commit e27db4d

Please sign in to comment.