diff --git a/chrome/content/zotero/elements/quickSearchTextbox.js b/chrome/content/zotero/elements/quickSearchTextbox.js index dfed5ea5f5..b8c7e2dd8a 100644 --- a/chrome/content/zotero/elements/quickSearchTextbox.js +++ b/chrome/content/zotero/elements/quickSearchTextbox.js @@ -87,7 +87,6 @@ dropmarkerShadow.append(s1, s2, dropmarker); let searchBox = document.createXULElement("search-textbox"); - searchBox.inputField.setAttribute("data-l10n-id", "quicksearch-input"); searchBox.id = "zotero-tb-search-textbox"; this.searchTextbox = searchBox; @@ -153,9 +152,7 @@ this.searchModePopup.querySelector(`menuitem[value="${mode}"]`) .setAttribute('checked', 'true'); - this.searchTextbox.placeholder = this._searchModes[mode]; - // Have the placeholder announced by screen readers after the label for additional context - this.searchTextbox.inputField.setAttribute("aria-description", this.searchTextbox.placeholder); + document.l10n.setAttributes(this.searchTextbox.inputField, "quicksearch-input", { placeholder: this._searchModes[mode] }); } _id(id) { diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index e9d41c7442..e499d3b306 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -492,3 +492,5 @@ quicksearch-mode = .aria-label = Quick Search mode quicksearch-input = .aria-label = Quick Search + .placeholder = { $placeholder } + .aria-description = { $placeholder }