We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45d8621 commit ad4d8d3Copy full SHA for ad4d8d3
GitHubA11yFixes.user.js
@@ -22,8 +22,11 @@ function onSelectMenuItemChanged(target) {
22
function onDropdownChanged(target) {
23
target.firstElementChild.setAttribute("aria-haspopup", "true");
24
var expanded = target.classList.contains("active");
25
- target.children[0].setAttribute("aria-expanded", expanded ? "true" : "false");
+ target.firstElementChild.setAttribute("aria-expanded", expanded ? "true" : "false");
26
var items = target.children[1];
27
+ if (!items) {
28
+ return;
29
+ }
30
if (expanded) {
31
items.removeAttribute("aria-hidden");
32
// Focus the first item.
0 commit comments