diff options
author | Patrick H. Lauke <redux@splintered.co.uk> | 2021-09-06 22:14:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 22:14:21 +0300 |
commit | aa06dffdf65f15f6663159c9785432b82adde20f (patch) | |
tree | 86b87180ae0a131f57b3354a342e2722fe480e3f /site/content/docs/5.1/components/list-group.md | |
parent | 16aab88a67add236b6857207b32b85b536b1a0c6 (diff) |
Disabled link cleanup (#34886)
* Disabled link cleanup
per https://www.w3.org/TR/html-aria/#docconformance
> It is NOT RECOMMENDED to use `aria-disabled="true"` on an `a` element with an `href` attribute.
>
>NOTE
>If a link needs to be "disabled", remove the `href` attribute.
This PR removes the unnecessary `href="#"`, `tabindex="-1"`, and `aria-disabled="true"` from disabled links in both docs pages and examples. `aria-disabled="true"` *is* kept for disabled link-based buttons (that have `role="button"`) as there it's appropriate to use (you *want* to convey to assistive technologies that this thing you're claiming is a button is also disabled at the moment)
Further, the PR extends the "Link functionality caveat" to show the "proper" way (removing `href` and adding `.disabled` class only) to disable a link, but then explains what to do if that's not possible (and then keeps an example with all the traditional `href="#" tabindex="-1" aria-disabled="true"`, but explains clearly that it's not ideal). Same sort of explanation is also added to the pointer event utilities page
* Turn big note into actual normal doc text
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'site/content/docs/5.1/components/list-group.md')
-rw-r--r-- | site/content/docs/5.1/components/list-group.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/site/content/docs/5.1/components/list-group.md b/site/content/docs/5.1/components/list-group.md index c49541bdba..cf6b06be90 100644 --- a/site/content/docs/5.1/components/list-group.md +++ b/site/content/docs/5.1/components/list-group.md @@ -62,7 +62,7 @@ Be sure to **not use the standard `.btn` classes here**. <a href="#" class="list-group-item list-group-item-action">A second link item</a> <a href="#" class="list-group-item list-group-item-action">A third link item</a> <a href="#" class="list-group-item list-group-item-action">A fourth link item</a> - <a href="#" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">A disabled link item</a> + <a class="list-group-item list-group-item-action disabled">A disabled link item</a> </div> {{< /example >}} |