From c0c3d93019fdfb6cb96f3a11e6edbdfd6aa5addf Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Fri, 19 Jul 2024 13:44:01 -0700 Subject: [PATCH] vpat 45: bibliography dialog instructions and aria (#4413) - made the wrapper of the dialog focusable and added aria-description so that when the dialog opens it announces how to use the dialog - added aria-labels to buttons, references list, and editor - make sure that the references list always selects an item when focused without clicking - added a border to focused buttons from simple editor to make it visually clear when they received focus --- .../zotero/integration/editBibliographyDialog.js | 7 +++++++ .../integration/editBibliographyDialog.xhtml | 13 +++++++------ chrome/locale/en-US/zotero/zotero.ftl | 14 ++++++++++++++ chrome/skin/default/zotero/integration.css | 6 +++++- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/integration/editBibliographyDialog.js b/chrome/content/zotero/integration/editBibliographyDialog.js index f51c98fc38..5d0ced90ae 100644 --- a/chrome/content/zotero/integration/editBibliographyDialog.js +++ b/chrome/content/zotero/integration/editBibliographyDialog.js @@ -118,6 +118,13 @@ var Zotero_Bibliography_Dialog = new function () { _updatePreview(); } + // When reference list is focused and nothing is selected, select the first item + this.listItemFocused = function () { + if (!_itemList.selectedItems.length) { + _itemList.selectedIndex = 0; + } + }; + /** * Called when an item in the reference list is clicked */ diff --git a/chrome/content/zotero/integration/editBibliographyDialog.xhtml b/chrome/content/zotero/integration/editBibliographyDialog.xhtml index 524576a119..5f9ba73af0 100644 --- a/chrome/content/zotero/integration/editBibliographyDialog.xhtml +++ b/chrome/content/zotero/integration/editBibliographyDialog.xhtml @@ -58,7 +58,7 @@ Services.scriptloader.loadSubScript("chrome://zotero/content/integration/editBibliographyDialog.js", this); - + @@ -75,18 +75,19 @@ - - + + - -