mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
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>
This commit is contained in:
@@ -1157,7 +1157,7 @@ direction: rtl
|
||||
<a class="nav-link active" aria-current="page" href="#">نشط</a>
|
||||
<a class="nav-link" href="#">رابط</a>
|
||||
<a class="nav-link" href="#">رابط</a>
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a>
|
||||
<a class="nav-link disabled">معطل</a>
|
||||
</nav>
|
||||
{{< /example >}}
|
||||
|
||||
@@ -1194,7 +1194,7 @@ direction: rtl
|
||||
<a class="nav-link" href="#">رابط</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a>
|
||||
<a class="nav-link disabled">معطل</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{< /example >}}
|
||||
@@ -1237,7 +1237,7 @@ direction: rtl
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a>
|
||||
<a class="nav-link disabled">معطل</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex">
|
||||
@@ -1276,7 +1276,7 @@ direction: rtl
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">معطل</a>
|
||||
<a class="nav-link disabled">معطل</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex">
|
||||
@@ -1332,7 +1332,7 @@ direction: rtl
|
||||
<nav aria-label="مثال آخر لترقيم الصفحات">
|
||||
<ul class="pagination pagination-lg flex-wrap">
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">السابق</a>
|
||||
<a class="page-link">السابق</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item active" aria-current="page">
|
||||
|
||||
Reference in New Issue
Block a user