mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-17 14:54:30 +01:00
v4: Improve accessible name of version dropdown in docs navbar (#36504)
- add `sr-only` "Bootstrap", which will be part of the accessible name - extra `sr-only` text to give some context - that the dropdown is about switching versions - remove the redundant id/aria-labelledby for the dropdown - change the control from `<a>` to `<button>`
This commit is contained in:
parent
d136302a57
commit
6fd203060b
@ -31,10 +31,10 @@
|
|||||||
|
|
||||||
<ul class="navbar-nav ml-md-auto">
|
<ul class="navbar-nav ml-md-auto">
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-item nav-link dropdown-toggle mr-md-2" href="#" id="bd-versions" data-toggle="dropdown" aria-expanded="false">
|
<button class="btn nav-link dropdown-toggle mr-md-2" data-toggle="dropdown" aria-expanded="false">
|
||||||
v{{ .Site.Params.docs_version }}
|
<span class="sr-only">Bootstrap </span> v{{ .Site.Params.docs_version }} <span class="sr-only">(switch to other versions)</span>
|
||||||
</a>
|
</button>
|
||||||
<div class="dropdown-menu dropdown-menu-md-right" aria-labelledby="bd-versions">
|
<div class="dropdown-menu dropdown-menu-md-right">
|
||||||
<a class="dropdown-item active" href="/docs/{{ .Site.Params.docs_version }}/">Latest ({{ .Site.Params.docs_version }}.x)</a>
|
<a class="dropdown-item active" href="/docs/{{ .Site.Params.docs_version }}/">Latest ({{ .Site.Params.docs_version }}.x)</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.1/">5.1.x</a>
|
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.1/">5.1.x</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user