vpat 5: do not include separator in qf list count (#4001)

Screen readers announce the index of the selected item
from the list of citations in the panel. This removes
the separators from the count, since they are not focusable
and should be skipped.
This commit is contained in:
abaevbog 2024-04-18 00:35:27 -04:00 committed by GitHub
parent 451cb8109a
commit 816aaca380
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1007,6 +1007,8 @@ var Zotero_QuickFormat = new function () {
var rll = document.createXULElement("richlistitem"); var rll = document.createXULElement("richlistitem");
rll.setAttribute("orient", "vertical"); rll.setAttribute("orient", "vertical");
rll.setAttribute("disabled", true); rll.setAttribute("disabled", true);
// This ensures that screen readers don't include it while announcing elements' count
rll.setAttribute("role", "presentation");
rll.setAttribute("class", loading ? "citation-dialog loading" : "citation-dialog separator"); rll.setAttribute("class", loading ? "citation-dialog loading" : "citation-dialog separator");
rll.appendChild(titleNode); rll.appendChild(titleNode);
rll.addEventListener("mousedown", _ignoreClick, true); rll.addEventListener("mousedown", _ignoreClick, true);