Commit 96ee5aba authored by John Emau's avatar John Emau Committed by Commit Bot

DevTools: Add labeled group to audit checkboxes

Marking the checkbox container as a group role and labeling it meets the
following WAI WCAG 2.1 success criteria and allows for screen readers to
announce the group label when focusing on a checkbox.

1.3.1 Info and Relationships - Level A
https://www.w3.org/WAI/WCAG21/quickref/#info-and-relationships

3.3.2 - Labels or Instructions - Level A
https://www.w3.org/WAI/WCAG21/quickref/#labels-or-instructions

Screenshot (NVDA Speech Viewer): https://i.imgur.com/ptmRGzu.png
Screenshot (Accessibility Tree): https://i.imgur.com/EUTyhTV.png

Bug: 963183
Change-Id: Ia801a9a74ca897b6bc94705d72109bd231b00653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695853Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
Commit-Queue: John Emau <John.Emau@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#706228}
parent 27fa8ed2
...@@ -64,6 +64,8 @@ Audits.StartView = class extends UI.Widget { ...@@ -64,6 +64,8 @@ Audits.StartView = class extends UI.Widget {
row.title = preset.description; row.title = preset.description;
row.appendChild(checkbox.element); row.appendChild(checkbox.element);
} }
UI.ARIAUtils.markAsGroup(categoryFormElements);
UI.ARIAUtils.setAccessibleName(categoryFormElements, ls`Audits`);
// Populate the throttling // Populate the throttling
const throttlingFormElements = fragment.$('throttling-form-elements'); const throttlingFormElements = fragment.$('throttling-form-elements');
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<message name="IDS_DEVTOOLS_b002a564ceda05dbdf012a48a145d0d3" desc="Status header in the Audits panel"> <message name="IDS_DEVTOOLS_b002a564ceda05dbdf012a48a145d0d3" desc="Status header in the Audits panel">
Printing Printing
</message> </message>
<message name="IDS_DEVTOOLS_b06c94565d768dd75535120f2f8482a7" desc="Text in Audits Start View"> <message name="IDS_DEVTOOLS_b06c94565d768dd75535120f2f8482a7" desc="Text in Audits Start View labeling audit configuraion control group">
Audits Audits
</message> </message>
<message name="IDS_DEVTOOLS_b1b01acb63f79615b05f6d816705d7d3" desc="Text in Audits Controller"> <message name="IDS_DEVTOOLS_b1b01acb63f79615b05f6d816705d7d3" desc="Text in Audits Controller">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment