mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Remove confusing unnecessary id/aria-labelledby for dropdown menus (#36487)
see https://github.com/twbs/bootstrap/discussions/35755 Note that even the APG guide for disclosure widgets doesn't use this optional "nice-to-have" extra bit https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/ (though they do use `aria-controls`, which in most current browser/AT combos is borked though)
This commit is contained in:
@@ -243,10 +243,10 @@ $utilities: map-merge(
|
||||
<p>Why write more JavaScript when you can write HTML? Nearly all of Bootstrap's JavaScript plugins feature a first-class data API, allowing you to use JavaScript just by adding <code>data</code> attributes.</p>
|
||||
<div class="p-4 mb-3 border rounded-3">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
@@ -255,10 +255,10 @@ $utilities: map-merge(
|
||||
</div>
|
||||
|
||||
{{ highlight (printf `<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown item</a></li>
|
||||
|
Reference in New Issue
Block a user