From 868947f4c802066963f8360b5203652f5e05f3e1 Mon Sep 17 00:00:00 2001 From: abaevbog Date: Mon, 26 Aug 2024 20:32:49 -0700 Subject: [PATCH] vpat 34-5: aria labels for the error console (#4625) Add hardcoded, non-localized labels to the X button next to the input filter and the actual console textarea --- chrome/content/zotero/standalone/standalone.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 6dce0b1da5..04e327f0a4 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -979,11 +979,17 @@ ZoteroStandalone.DebugOutput = { }; -function toJavaScriptConsole() { +async function toJavaScriptConsole() { // We need the DevTools' built-in require() for this const { require } = ChromeUtils.import("resource://devtools/shared/loader/Loader.jsm"); const { BrowserConsoleManager } = require("resource://devtools/client/webconsole/browser-console-manager.js"); - BrowserConsoleManager.openBrowserConsoleOrFocus(); + await BrowserConsoleManager.openBrowserConsoleOrFocus(); + // Add missing aria labels for the the VPAT review + let win = Services.wm.getMostRecentWindow("devtools:webconsole"); + // X button next to "Filter ouput" + win.document.querySelector(".devtools-searchinput-clear").setAttribute("aria-label", "Clear filter"); + // The actual input line + win.document.querySelector(".flexible-output-input textarea").setAttribute("aria-label", "Input line"); } function openRunJSWindow() {