From 816aaca3802332e45d53658f3908e4e69ca2cc1e Mon Sep 17 00:00:00 2001 From: abaevbog Date: Thu, 18 Apr 2024 00:35:27 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/integration/quickFormat.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index dbe78cd2cd..27ad9ae5e7 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -1007,6 +1007,8 @@ var Zotero_QuickFormat = new function () { var rll = document.createXULElement("richlistitem"); rll.setAttribute("orient", "vertical"); 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.appendChild(titleNode); rll.addEventListener("mousedown", _ignoreClick, true);