Commit 0c407210 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Return to exposing alertdialog as MSAA dialog

In CL:967465 we changed to exposing alertdialog from ROLE_SYSTEM_DIALOG
to ROLE_SYSTEM_ALERT, so that unfocused UI bubbles that appear would be
spoken by JAWS. However, this caused some permissions dialogs to be
spoken twice by JAWS, and caused NVDA not to read ARIA alertdialogs.

At a later point, we added xml-roles:alertdialog to these objects. This
seems to allow us to change the MSAA role back to ROLE_SYSTEM_DIALOG
while retaining the behavior we want for UI dialog bubbles, and also
fixing the regressions.

ROLE_SYSTEM_DIALOG + xml-roles:alertdialog:
- Works with JAWS dialog commands such as Insert+T to read title
  UI dialog bubbles that don't get focus.
- Fixes double speaking of permissions dialogs in JAWS
- Works in JAWS 2018, 2019, 2020
- Fixes non-reading of ARIA alertdialog in NVDA
- Complies with CORE-AAM spec and consistent with other browsers

R=nektar@chromium.org

Bug: 1071838,1007103
Change-Id: I116bb936dfd94aabedb269ae28d859956cec43c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154391
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761150}
parent c7255f01
...@@ -434,17 +434,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaAlert) { ...@@ -434,17 +434,10 @@ IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityAriaAlert) {
RunAriaTest(FILE_PATH_LITERAL("aria-alert.html")); RunAriaTest(FILE_PATH_LITERAL("aria-alert.html"));
} }
#if defined(OS_WIN)
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
DISABLED_AccessibilityAriaAlertDialog) {
RunAriaTest(FILE_PATH_LITERAL("aria-alertdialog.html"));
}
#else
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityAriaAlertDialog) { AccessibilityAriaAlertDialog) {
RunAriaTest(FILE_PATH_LITERAL("aria-alertdialog.html")); RunAriaTest(FILE_PATH_LITERAL("aria-alertdialog.html"));
} }
#endif
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest,
AccessibilityAriaAnyUnignored) { AccessibilityAriaAnyUnignored) {
......
...@@ -4731,9 +4731,11 @@ int AXPlatformNodeWin::MSAARole() { ...@@ -4731,9 +4731,11 @@ int AXPlatformNodeWin::MSAARole() {
switch (GetData().role) { switch (GetData().role) {
case ax::mojom::Role::kAlert: case ax::mojom::Role::kAlert:
case ax::mojom::Role::kAlertDialog:
return ROLE_SYSTEM_ALERT; return ROLE_SYSTEM_ALERT;
case ax::mojom::Role::kAlertDialog:
return ROLE_SYSTEM_DIALOG;
case ax::mojom::Role::kAnchor: case ax::mojom::Role::kAnchor:
return ROLE_SYSTEM_LINK; return ROLE_SYSTEM_LINK;
......
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