vpat 23: better aria label for itembox merge btn (#4173)

Added the field name for the label to be more descriptive.
The new announced label is e.g. "Select version of title field".

Followup to https://github.com/zotero/zotero/pull/4096#issuecomment-2121894422
This commit is contained in:
abaevbog 2024-05-30 01:44:49 -04:00 committed by GitHub
parent 6b4cac1fb5
commit c4dbf19446
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -674,7 +674,8 @@
var button = document.createXULElement("toolbarbutton");
button.className = 'zotero-field-version-button zotero-clicky-merge';
button.setAttribute('type', 'menu');
button.setAttribute('data-l10n-id', 'itembox-button-merge');
let fieldLocalName = rowLabel.querySelector("label")?.textContent;
document.l10n.setAttributes(button, 'itembox-button-merge', { field: fieldLocalName || "" });
var popup = button.appendChild(document.createXULElement("menupopup"));

View file

@ -122,7 +122,7 @@ item-button-view-online =
itembox-button-options =
.tooltiptext = Open Context Menu
itembox-button-merge =
.aria-label = Select Version
.aria-label = Select version of { $field } field
reader-use-dark-mode-for-content =
.label = Use Dark Mode for Content