1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-26 23:04:32 +02:00

Remove incorrect aria-haspopup from dropdown toggles (#28299)

`aria-haspopup` use requires the use of an ARIA `menu`, `listbox`, `tree`, `grid` or `dialog` (see https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup)

in our use (as generic disclosure widgets), it's incorrect and sets up the wrong assumption/behavior from assistive technologies.

in future, we likely want to change our dropdowns to essentially be like a `dialog` - move focus to it when opened, possibly make it modal so focus is maintained inside it and the rest of the page
is hidden/inert.

but for now, removing the incorrect attribute is probably the quickest, most immediate fix.
This commit is contained in:
Patrick H. Lauke
2019-02-19 09:25:37 +00:00
committed by XhmikosR
parent 68a8af4a36
commit 4b00aa6c4e
16 changed files with 92 additions and 92 deletions

View File

@@ -727,7 +727,7 @@ $(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-haspopup="true" aria-expanded="false">Dropdown</a>' +
' <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="dropdown-item" href="#">Action</a>' +
' <a class="dropdown-item" href="#">Another action</a>' +