summaryrefslogtreecommitdiffstats
path: root/toolkit/components/aboutconfig
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/aboutconfig
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/aboutconfig')
-rw-r--r--toolkit/components/aboutconfig/content/aboutconfig.js1
-rw-r--r--toolkit/components/aboutconfig/test/browser/browser.toml3
-rw-r--r--toolkit/components/aboutconfig/test/browser/browser_clipboard.js17
-rw-r--r--toolkit/components/aboutconfig/test/browser/browser_edit.js21
4 files changed, 40 insertions, 2 deletions
diff --git a/toolkit/components/aboutconfig/content/aboutconfig.js b/toolkit/components/aboutconfig/content/aboutconfig.js
index e11021ed64..5e67b764b5 100644
--- a/toolkit/components/aboutconfig/content/aboutconfig.js
+++ b/toolkit/components/aboutconfig/content/aboutconfig.js
@@ -255,6 +255,7 @@ class PrefRow {
if (this.editing) {
this.inputField = document.createElement("input");
this.inputField.value = this.value;
+ this.inputField.ariaLabel = this.name;
if (this.type == "Number") {
this.inputField.type = "number";
this.inputField.required = true;
diff --git a/toolkit/components/aboutconfig/test/browser/browser.toml b/toolkit/components/aboutconfig/test/browser/browser.toml
index acccf1f8f0..a0cce686b8 100644
--- a/toolkit/components/aboutconfig/test/browser/browser.toml
+++ b/toolkit/components/aboutconfig/test/browser/browser.toml
@@ -11,10 +11,9 @@ support-files = ["head.js"]
["browser_basic.js"]
["browser_clipboard.js"]
-fail-if = ["a11y_checks"] # Bug 1854447 th, td.cell-value, #prefs may not be focusable; #show-all may be unlabeled
["browser_edit.js"]
-fail-if = ["a11y_checks"] # Bug 1854447 span, th, td.cell-value may not be focusable; #show-all, input, button-add/delete/reset ghost-buttons may not be labeled
+fail-if = ["a11y_checks"] # Bugs 1854447 and 1882380 span may not be focusable
skip-if = ["os == 'linux' && ccov"] # Bug 1613515, the test consistently times out on Linux coverage builds.
["browser_locked.js"]
diff --git a/toolkit/components/aboutconfig/test/browser/browser_clipboard.js b/toolkit/components/aboutconfig/test/browser/browser_clipboard.js
index bcaa2c0328..a8fca568c7 100644
--- a/toolkit/components/aboutconfig/test/browser/browser_clipboard.js
+++ b/toolkit/components/aboutconfig/test/browser/browser_clipboard.js
@@ -33,6 +33,14 @@ add_task(async function test_copy() {
let selectText = async target => {
let { width, height } = target.getBoundingClientRect();
+
+ // We intentionally turn off this a11y check, because the following
+ // series of mouse events is purposefully targeting a non-interactive
+ // text content. This action does not require the element to have an
+ // interactive accessible to be done by assistive technology with caret
+ // browsing (when/if supported), this rule check shall be ignored by
+ // a11y_checks suite.
+ AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
EventUtils.synthesizeMouse(
target,
1,
@@ -54,6 +62,7 @@ add_task(async function test_copy() {
{ type: "mouseup" },
this.browser.contentWindow
);
+ AccessibilityUtils.resetEnv();
};
// Drag across the name cell.
@@ -107,6 +116,13 @@ add_task(async function test_copy_multiple() {
let { width, height } = endRow.valueCell.getBoundingClientRect();
// Drag from the top left of the first row to the bottom right of the last.
+ // We intentionally turn off this a11y check, because the following
+ // series of mouse events is purposefully targeting a non-interactive
+ // text content. This action does not require the element to have an
+ // interactive accessible to be done by assistive technology with caret
+ // browsing (when/if supported), this rule check shall be ignored by
+ // a11y_checks suite.
+ AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
EventUtils.synthesizeMouse(
startRow.nameCell,
1,
@@ -129,6 +145,7 @@ add_task(async function test_copy_multiple() {
{ type: "mouseup" },
this.browser.contentWindow
);
+ AccessibilityUtils.resetEnv();
await SimpleTest.promiseClipboardChange(expectedString, async () => {
await BrowserTestUtils.synthesizeKey(
diff --git a/toolkit/components/aboutconfig/test/browser/browser_edit.js b/toolkit/components/aboutconfig/test/browser/browser_edit.js
index 9d10fb1e75..24fb168e76 100644
--- a/toolkit/components/aboutconfig/test/browser/browser_edit.js
+++ b/toolkit/components/aboutconfig/test/browser/browser_edit.js
@@ -282,6 +282,11 @@ add_task(async function test_edit_field_selected() {
Assert.equal(row.value, startValue);
row.editColumnButton.click();
Assert.equal(row.valueInput.value, startValue);
+ Assert.equal(
+ row.valueInput.getAttribute("aria-label"),
+ prefName,
+ "The input field is labeled from the pref name"
+ );
EventUtils.sendString(endValue, this.window);
@@ -334,15 +339,31 @@ add_task(async function test_double_click_modify() {
let click = (target, opts) =>
EventUtils.synthesizeMouseAtCenter(target, opts, this.window);
let doubleClick = target => {
+ // We intentionally turn off this a11y check, because the following series
+ // of clicks (in these test cases) is either performing an activation of
+ // the edit mode for prefs or selecting a text in focused inputs. The
+ // edit mode can be activated with a separate "Edit" or "Toggle" button
+ // provided for each pref, and the text selection can be performed with
+ // caret browsing (when supported). Thus, this rule check can be ignored
+ // by a11y_checks suite.
+ AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
// Trigger two mouse events to simulate the first then second click.
click(target, { clickCount: 1 });
click(target, { clickCount: 2 });
+ AccessibilityUtils.resetEnv();
};
let tripleClick = target => {
+ // We intentionally turn off this a11y check, because the following series
+ // of clicks is purposefully targeting a non - interactive text content.
+ // This action does not require the element to have an interactive
+ // accessible to be done by assistive technology with caret browsing
+ // (when supported), this rule check shall be ignored by a11y_checks suite.
+ AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
// Trigger all 3 mouse events to simulate the three mouse events we'd see.
click(target, { clickCount: 1 });
click(target, { clickCount: 2 });
click(target, { clickCount: 3 });
+ AccessibilityUtils.resetEnv();
};
// Check double-click to edit a boolean.