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/examples/sticky-footer-navbar/index.html | |
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/examples/sticky-footer-navbar/index.html')
-rw-r--r-- | site/content/docs/5.1/examples/sticky-footer-navbar/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/site/content/docs/5.1/examples/sticky-footer-navbar/index.html b/site/content/docs/5.1/examples/sticky-footer-navbar/index.html index ce036dc09c..cd72aa778c 100644 --- a/site/content/docs/5.1/examples/sticky-footer-navbar/index.html +++ b/site/content/docs/5.1/examples/sticky-footer-navbar/index.html @@ -24,7 +24,7 @@ body_class: "d-flex flex-column h-100" <a class="nav-link" href="#">Link</a> </li> <li class="nav-item"> - <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> + <a class="nav-link disabled">Disabled</a> </li> </ul> <form class="d-flex"> |