From 70c4863c3427e2c2ccb4da2b0f54d59fea3c607c Mon Sep 17 00:00:00 2001 From: James Teh Date: Mon, 24 Apr 2023 23:35:51 +0000 Subject: [PATCH] Bug 1822112: Make Marionette/WebDriver getComputedRole return standardized ARIA role names. r=jdescottes,webdriver-reviewers Differential Revision: https://phabricator.services.mozilla.com/D175586 --- .../actors/MarionetteCommandsChild.sys.mjs | 3 +- .../meta/wai-aria/role/basic.html.ini | 4 - .../meta/wai-aria/role/region-roles.html.ini | 3 - .../meta/wai-aria/role/roles.html.ini | 194 +++++------------- .../meta/wai-aria/role/synonym-roles.html.ini | 2 + .../tests/get_computed_role/get.py.ini | 7 - 6 files changed, 58 insertions(+), 155 deletions(-) delete mode 100644 testing/web-platform/meta/wai-aria/role/basic.html.ini delete mode 100644 testing/web-platform/meta/wai-aria/role/region-roles.html.ini delete mode 100644 testing/web-platform/meta/webdriver/tests/get_computed_role/get.py.ini diff --git a/remote/marionette/actors/MarionetteCommandsChild.sys.mjs b/remote/marionette/actors/MarionetteCommandsChild.sys.mjs index e86ebd7a13f1..846ace278157 100644 --- a/remote/marionette/actors/MarionetteCommandsChild.sys.mjs +++ b/remote/marionette/actors/MarionetteCommandsChild.sys.mjs @@ -311,8 +311,7 @@ export class MarionetteCommandsChild extends JSWindowActorChild { return null; } - // TODO: Bug 1822112. Accessibility service is not returning WAI-ARIA roles. - return lazy.accessibility.service.getStringRole(accessible.role); + return accessible.computedARIARole; } /** diff --git a/testing/web-platform/meta/wai-aria/role/basic.html.ini b/testing/web-platform/meta/wai-aria/role/basic.html.ini deleted file mode 100644 index 9b1970440637..000000000000 --- a/testing/web-platform/meta/wai-aria/role/basic.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[basic.html] - [tests explicit role] - expected: FAIL - bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1822112 diff --git a/testing/web-platform/meta/wai-aria/role/region-roles.html.ini b/testing/web-platform/meta/wai-aria/role/region-roles.html.ini deleted file mode 100644 index 6df96d4ef4ad..000000000000 --- a/testing/web-platform/meta/wai-aria/role/region-roles.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[region-roles.html] - [region without label] - expected: FAIL diff --git a/testing/web-platform/meta/wai-aria/role/roles.html.ini b/testing/web-platform/meta/wai-aria/role/roles.html.ini index 0fad5e035cb0..6d50820ad79d 100644 --- a/testing/web-platform/meta/wai-aria/role/roles.html.ini +++ b/testing/web-platform/meta/wai-aria/role/roles.html.ini @@ -1,251 +1,167 @@ [roles.html] [role: alertdialog] - expected: FAIL + expected: [PASS, FAIL] [role: application] - expected: - if (os == "win") and debug and (processor == "x86_64") and not swgl: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: article] - expected: - if (os == "win") and (processor == "x86_64") and debug and not swgl: [FAIL, PASS] - if (os == "win") and (processor == "x86_64") and not debug: [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: banner] - expected: FAIL + expected: [PASS, FAIL] [role: button] - expected: FAIL + expected: [PASS, FAIL] [role: checkbox] - expected: FAIL + expected: [PASS, FAIL] [role: combobox] - expected: FAIL + expected: [PASS, FAIL] [role: complementary] - expected: FAIL + expected: [PASS, FAIL] [role: contentinfo] - expected: FAIL + expected: [PASS, FAIL] [role: definition] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1829028 [role: deletion] - expected: FAIL + expected: [PASS, FAIL] [role: document] - expected: FAIL + expected: [PASS, FAIL] [role: emphasis] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1732306 [role: feed] - expected: FAIL + expected: [PASS, FAIL] [role: generic] - expected: FAIL + expected: [PASS, FAIL] [role: group] - expected: FAIL + expected: [PASS, FAIL] [role: insertion] - expected: FAIL + expected: [PASS, FAIL] [role: log] - expected: FAIL + expected: [PASS, FAIL] [role: main] - expected: FAIL + expected: [PASS, FAIL] [role: marquee] - expected: FAIL + expected: [PASS, FAIL] [role: math] - expected: FAIL + expected: [PASS, FAIL] [role: navigation] - expected: FAIL + expected: [PASS, FAIL] [role: radio] - expected: FAIL + expected: [PASS, FAIL] [role: radiogroup] - expected: FAIL + expected: [PASS, FAIL] [role: search] - expected: FAIL + expected: [PASS, FAIL] [role: searchbox] - expected: FAIL + expected: [PASS, FAIL] [role: status] - expected: FAIL + expected: [PASS, FAIL] [role: strong] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1732306 [role: textbox] - expected: FAIL + expected: [PASS, FAIL] [role: time] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1732306 [role: timer] - expected: FAIL + expected: [PASS, FAIL] [role: blockquote] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: caption] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: code] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "win") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: dialog] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: figure] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: form] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "linux") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: heading] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: link] - expected: - if (os == "win") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: meter] - expected: - if (os == "win") and not debug: [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: note] - expected: - if (os == "linux") and not debug and fission and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: paragraph] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: progressbar] - expected: - if (os == "linux") and not debug and fission and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: scrollbar] - expected: - if (os == "win") and (processor == "x86_64") and not debug: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: separator] - expected: - if (os == "linux") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug: [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: slider] - expected: - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: spinbutton] - expected: - if (os == "win") and not swgl and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: subscript] - expected: - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "mac") and debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: suggestion] - expected: - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: superscript] - expected: - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: switch] - expected: - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "linux") and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: term] - expected: - if (os == "linux") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "win") and not debug: [FAIL, PASS] - if (os == "mac") and not debug: [FAIL, PASS] - [PASS, FAIL] + expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1829028 [role: toolbar] - expected: - if (os == "linux") and fission and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "linux") and fission and debug and not swgl: [FAIL, PASS] - if (os == "linux") and not fission and not swgl: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] [role: tooltip] - expected: - if (os == "linux") and not swgl and fission and not debug and (processor == "x86_64"): [FAIL, PASS] - if (os == "linux") and not swgl and fission and debug: [FAIL, PASS] - if (os == "linux") and not swgl and not fission: [FAIL, PASS] - if (os == "win") and not debug and (processor == "x86"): [FAIL, PASS] - if (os == "mac") and debug: [FAIL, PASS] - [PASS, FAIL] + expected: [PASS, FAIL] diff --git a/testing/web-platform/meta/wai-aria/role/synonym-roles.html.ini b/testing/web-platform/meta/wai-aria/role/synonym-roles.html.ini index 113afa639b8f..7f8bc124eaf3 100644 --- a/testing/web-platform/meta/wai-aria/role/synonym-roles.html.ini +++ b/testing/web-platform/meta/wai-aria/role/synonym-roles.html.ini @@ -1,9 +1,11 @@ [synonym-roles.html] [none role == computedrole none] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1828600 [synonym presentation role == computedrole none] expected: FAIL + bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1828600 [image role == computedrole image] expected: FAIL diff --git a/testing/web-platform/meta/webdriver/tests/get_computed_role/get.py.ini b/testing/web-platform/meta/webdriver/tests/get_computed_role/get.py.ini deleted file mode 100644 index cfaefa847917..000000000000 --- a/testing/web-platform/meta/webdriver/tests/get_computed_role/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_computed_roles[-input-searchbox\]] - bug: 1822112 - expected: FAIL - - [test_computed_roles[-img-button\]] - expected: FAIL