vpat 57/58: classic citation editor aria fixes

- vpat 57: remove tabindex values, set tabindex=0 on all focusable
fields. It allows mozilla to determine the best focus sequence
for keyboard navigation and fixes wrong order where some inputs would
go before the "Ok" and "Cancel" buttons and some - after
- vpat 58: added labels to all inputs to be announced when focused.
Added separate labels for locator menulist and for the locator input so
that the locator type has a proper label. It is also better to have
visible explicit labels when possible
This commit is contained in:
Bogdan Abaev 2024-04-22 22:39:55 -04:00 committed by Adomas Ven
parent d815476a14
commit 784ccdd996
2 changed files with 14 additions and 8 deletions

View file

@ -96,14 +96,14 @@
<hbox align="stretch" style="margin-top: 8px"> <hbox align="stretch" style="margin-top: 8px">
<vbox flex="1"> <vbox flex="1">
<hbox align="center"> <hbox align="center">
<label value="&zotero.citation.prefix.label;"/> <label value="&zotero.citation.prefix.label;" control="prefix"/>
<html:input type="text" class="fix" id="prefix" tabindex="3" <html:input type="text" class="fix" id="prefix" tabindex="0"
oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" oninput="Zotero_Citation_Dialog.confirmRegenerate(false)"
onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/> onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label value="&zotero.citation.suffix.label;"/> <label value="&zotero.citation.suffix.label;" control="suffix"/>
<html:input type="text" class="fix" id="suffix" tabindex="4" <html:input type="text" class="fix" id="suffix" tabindex="0"
oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" oninput="Zotero_Citation_Dialog.confirmRegenerate(false)"
onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/> onchange="Zotero_Citation_Dialog.confirmRegenerate(true)"/>
</hbox> </hbox>
@ -111,14 +111,18 @@
</vbox> </vbox>
<separator flex="4"/> <separator flex="4"/>
<vbox flex="1"> <vbox flex="1">
<hbox align="stretch"> <hbox align="center">
<menulist onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="label" tabindex="5" native="true"> <label data-l10n-id="quickformat-locator-type" control="label"></label>
<menulist onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="label" tabindex="0" native="true">
<menupopup id="locator-type-popup"/> <menupopup id="locator-type-popup"/>
</menulist> </menulist>
<html:input oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" tabindex="2"/> </hbox>
<hbox align="center">
<label data-l10n-id="quickformat-locator-value" control="locator"></label>
<html:input oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" tabindex="0"/>
</hbox> </hbox>
<separator style="height: 2px" flex="1"/> <separator style="height: 2px" flex="1"/>
<checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppress-author" label="&zotero.citation.suppressAuthor.label;" tabindex="6" native="true"/> <checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppress-author" label="&zotero.citation.suppressAuthor.label;" tabindex="0" native="true"/>
</vbox> </vbox>
</hbox> </hbox>

View file

@ -482,6 +482,8 @@ quickformat-aria-input = Type to search for an item to include in this citation.
quickformat-aria-item = Press { return-or-enter } to add this item to the citation. Press Tab to go back to the search field. quickformat-aria-item = Press { return-or-enter } to add this item to the citation. Press Tab to go back to the search field.
quickformat-accept = quickformat-accept =
.tooltiptext = Save edits to this citation .tooltiptext = Save edits to this citation
quickformat-locator-type = Locator type:
quickformat-locator-value = Locator value:
insert-note-aria-input = Type to search for a note. Press Tab to navigate the list of results. Press Escape to close the dialog. insert-note-aria-input = Type to search for a note. Press Tab to navigate the list of results. Press Escape to close the dialog.
insert-note-aria-item = Press { return-or-enter } to select this note. Press Tab to go back to the search field. Press Escape to close the dialog. insert-note-aria-item = Press { return-or-enter } to select this note. Press Tab to go back to the search field. Press Escape to close the dialog.