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
This commit is contained in:
abaevbog 2024-08-26 20:32:49 -07:00 • committed by GitHub
parent c900eb7951
commit 868947f4c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {