diff options
author | Patrick H. Lauke <redux@splintered.co.uk> | 2022-06-03 19:28:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 19:28:18 +0300 |
commit | b4c994d2960ca364d04764bd0787c24006f0200b (patch) | |
tree | 7e67f8c76f3e6af4e5e197906c34b55e4534c259 /js/tests | |
parent | 4e951f8bc9cf3d0f60dd685027632f245022546a (diff) |
Remove confusing unnecessary id/aria-labelledby for dropdown menus (#36491)
v4 port of https://github.com/twbs/bootstrap/pull/36487
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/unit/dropdown.js | 4 | ||||
-rw-r--r-- | js/tests/visual/dropdown.html | 20 | ||||
-rw-r--r-- | js/tests/visual/scrollspy.html | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index ba9d5b92ec..db6c893fb2 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -752,8 +752,8 @@ $(function () { var done = assert.async() var html = '<nav class="navbar navbar-expand-md navbar-light bg-light">' + '<div class="dropdown">' + - ' <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>' + - ' <div class="dropdown-menu" aria-labelledby="dropdown">' + + ' <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false">Dropdown</a>' + + ' <div class="dropdown-menu">' + ' <a class="dropdown-item" href="#">Action</a>' + ' <a class="dropdown-item" href="#">Another action</a>' + ' <a class="dropdown-item" href="#">Something else here</a>' + diff --git a/js/tests/visual/dropdown.html b/js/tests/visual/dropdown.html index d3aac6dc36..29b53a33bd 100644 --- a/js/tests/visual/dropdown.html +++ b/js/tests/visual/dropdown.html @@ -28,8 +28,8 @@ <a class="nav-link" href="#">Link</a> </li> <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown"> + <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> @@ -50,8 +50,8 @@ <a class="nav-link" href="#">Link</a> </li> <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown2"> + <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> @@ -129,10 +129,10 @@ </div> </div> <div class="btn-group dropright"> - <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuRight" data-toggle="dropdown" aria-expanded="false"> + <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false"> Dropright </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuRight"> + <div class="dropdown-menu"> <button class="dropdown-item" type="button">Action</button> <button class="dropdown-item" type="button">Another action</button> <button class="dropdown-item" type="button">Something else here</button> @@ -151,10 +151,10 @@ </div> </div> <div class="btn-group dropleft"> - <button class="btn btn-secondary dropdown-toggle" type="button" id="dropleftMenu" data-toggle="dropdown" aria-expanded="false"> + <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false"> Dropleft </button> - <div class="dropdown-menu" aria-labelledby="dropleftMenu"> + <div class="dropdown-menu"> <button class="dropdown-item" type="button">Action</button> <button class="dropdown-item" type="button">Another action</button> <button class="dropdown-item" type="button">Something else here</button> @@ -189,10 +189,10 @@ </div> <div class="col-sm-3 mt-4"> <div class="dropdown"> - <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" data-display="static" aria-expanded="false"> + <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" data-display="static" aria-expanded="false"> Dropdown menu without Popper.js </button> - <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <div class="dropdown-menu"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something else here</a> diff --git a/js/tests/visual/scrollspy.html b/js/tests/visual/scrollspy.html index b1f8cbcdaa..703946c27a 100644 --- a/js/tests/visual/scrollspy.html +++ b/js/tests/visual/scrollspy.html @@ -24,8 +24,8 @@ <a class="nav-link" href="#mdo">@mdo</a> </li> <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a> - <div class="dropdown-menu" aria-labelledby="dropdown"> + <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu"> <a class="dropdown-item" href="#one">One</a> <a class="dropdown-item" href="#two">Two</a> <a class="dropdown-item" href="#three">Three</a> |