mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
fx140: a11y fix voiceover not reading out menulist labels (#5540)
Post-fx140, menulist labels in chrome windows are not announced by VoiceOver. Setting the menulist's role to 'combobox' addresses this and gets VoiceOver to announce the labels again. This is interesting because 'combobox' is supposedly menulist's implicit role, so it's not clear why this helps. It does slightly change the way VoiceOver announces menulists: it announces "combobox" instead of "popup button", but semantically combobox is still appropriate per https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only Fixes: #5424
This commit is contained in:
parent
e896fd0137
commit
562fed6e7e
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue