diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index 0e3b60939b..4199db45f6 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -241,6 +241,13 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/itemTreeMe this.removeAttribute("aria-hidden"); }); }); + // Fx140: set the menulist role to 'combobox' to fix VoiceOver no longer announcing + // menulist's label. combobox is already menulist's implicit role, so it's not clear why this helps. + // Handle this here instead of connectedCallback of menulist because that doesn't get called + // if menulist exists in the initial .xhtml (vs inserted dynamically) + if (this.parentElement && this.parentElement.localName == 'menulist') { + this.parentElement.setAttribute("role", "combobox"); + } // This event is triggered after clicking the menu and before popuphiding // where we control whether the fade out animation should run