]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Disabled link cleanup (#34886)
authorPatrick H. Lauke <redux@splintered.co.uk>
Mon, 6 Sep 2021 19:14:21 +0000 (20:14 +0100)
committerGitHub <noreply@github.com>
Mon, 6 Sep 2021 19:14:21 +0000 (22:14 +0300)
commitaa06dffdf65f15f6663159c9785432b82adde20f
tree86b87180ae0a131f57b3354a342e2722fe480e3f
parent16aab88a67add236b6857207b32b85b536b1a0c6
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>
19 files changed:
site/content/docs/5.1/components/buttons.md
site/content/docs/5.1/components/card.md
site/content/docs/5.1/components/dropdowns.md
site/content/docs/5.1/components/list-group.md
site/content/docs/5.1/components/navbar.md
site/content/docs/5.1/components/navs-tabs.md
site/content/docs/5.1/components/pagination.md
site/content/docs/5.1/examples/blog-rtl/index.html
site/content/docs/5.1/examples/blog/index.html
site/content/docs/5.1/examples/carousel-rtl/index.html
site/content/docs/5.1/examples/carousel/index.html
site/content/docs/5.1/examples/cheatsheet-rtl/index.html
site/content/docs/5.1/examples/cheatsheet/index.html
site/content/docs/5.1/examples/navbar-bottom/index.html
site/content/docs/5.1/examples/navbar-fixed/index.html
site/content/docs/5.1/examples/navbar-static/index.html
site/content/docs/5.1/examples/navbars/index.html
site/content/docs/5.1/examples/sticky-footer-navbar/index.html
site/content/docs/5.1/utilities/interactions.md