From 2af853cc0a9f0f6f9d90d0a122be0163dd19621d Mon Sep 17 00:00:00 2001 From: Cam Bickel Date: Thu, 12 Jan 2023 18:10:32 +0000 Subject: [PATCH] shortcuts: Add aria-label and role for shortcut key icons This CL improves the usability of the shortcuts app for screen readers by adding role=img and an aria-label to each shortcut key icon. Previously, ChromeVox would skip over icons and not read their name, or read the key name (e.g. "ZoomToggle" for fullscreen). I also added a test that goes through and checks that each string ID in keyToIconNameMap has been loaded into the WebUI. Bug: b:216049298 Test: browser_tests ShortcutCustomizationApp* Change-Id: I62d2d042ef03e0854b3d771542c7743671a78527 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4153154 Commit-Queue: Camden Bickel Reviewed-by: Michael Checo Reviewed-by: Jimmy Gong Cr-Commit-Position: refs/heads/main@{#1091931} --- .../resources/js/input_key.html | 4 +- .../resources/js/input_key.ts | 26 ++++++- .../shortcut_customization_app_ui.cc | 48 ++++++++++++ .../shortcut_customization/input_key_test.ts | 25 +++++- chromeos/chromeos_strings.grd | 78 +++++++++++++++++++ 5 files changed, 178 insertions(+), 3 deletions(-) diff --git a/ash/webui/shortcut_customization_ui/resources/js/input_key.html b/ash/webui/shortcut_customization_ui/resources/js/input_key.html index f84bf1cd0d4036..a5d4febbc15454 100644 --- a/ash/webui/shortcut_customization_ui/resources/js/input_key.html +++ b/ash/webui/shortcut_customization_ui/resources/js/input_key.html @@ -51,7 +51,9 @@