From 950e206ca64310d2df2d6efc44f0c7c8c20bf70a Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 9 Mar 2023 19:13:48 -0800 Subject: [PATCH 01/13] simple role cases and region special cases --- wai-aria/role/region-roles.html | 24 ++++++ wai-aria/role/roles.html | 141 ++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 wai-aria/role/region-roles.html create mode 100644 wai-aria/role/roles.html diff --git a/wai-aria/role/region-roles.html b/wai-aria/role/region-roles.html new file mode 100644 index 00000000000000..349e933a8e0ca8 --- /dev/null +++ b/wai-aria/role/region-roles.html @@ -0,0 +1,24 @@ + + + + + + + + +
x
+
x
+ + diff --git a/wai-aria/role/roles.html b/wai-aria/role/roles.html new file mode 100644 index 00000000000000..3179b585f08484 --- /dev/null +++ b/wai-aria/role/roles.html @@ -0,0 +1,141 @@ + + + Simple Core ARIA Role Verification Tests + + + + + + + + + \ No newline at end of file From 6d3502feff983841b4e3cf245b667207046183be Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 9 Mar 2023 23:51:57 -0800 Subject: [PATCH 02/13] synonym roles tests, reviewer+, and minor errata --- wai-aria/role/synonym-roles.html | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 wai-aria/role/synonym-roles.html diff --git a/wai-aria/role/synonym-roles.html b/wai-aria/role/synonym-roles.html new file mode 100644 index 00000000000000..0fea4a5864f729 --- /dev/null +++ b/wai-aria/role/synonym-roles.html @@ -0,0 +1,43 @@ + + + + Region Role Verification Tests + + + + + + + + +
x
+ + +
x
+ + + + + \ No newline at end of file From 22562347c3e86f6c74269c0b238beac96a7383a3 Mon Sep 17 00:00:00 2001 From: James Craig Date: Fri, 10 Mar 2023 00:09:49 -0800 Subject: [PATCH 03/13] synonym roles tests, reviewer+, and minor errata --- wai-aria/META.yml | 1 + wai-aria/role/region-roles.html | 20 +++++++++++++------- wai-aria/role/roles.html | 27 ++++++++++++++++----------- wai-aria/role/synonym-roles.html | 4 ++-- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/wai-aria/META.yml b/wai-aria/META.yml index 864132a5a36c6d..25ab1c28495042 100644 --- a/wai-aria/META.yml +++ b/wai-aria/META.yml @@ -1,5 +1,6 @@ spec: https://w3c.github.io/aria/ suggested_reviewers: + - cookiecrook - halindrome - joanmarie - michael-n-cooper diff --git a/wai-aria/role/region-roles.html b/wai-aria/role/region-roles.html index 349e933a8e0ca8..d5213b48e87db1 100644 --- a/wai-aria/role/region-roles.html +++ b/wai-aria/role/region-roles.html @@ -1,10 +1,14 @@ - - - - - - + + + Region Role Verification Tests + + + + + + +
x
x
@@ -13,7 +17,7 @@ promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('no_label')); - assert_true(role == ""); + assert_true(role == "generic"); }, "region with no label"); promise_test(async t => { @@ -22,3 +26,5 @@ }, "region with label"); + + \ No newline at end of file diff --git a/wai-aria/role/roles.html b/wai-aria/role/roles.html index 3179b585f08484..4c4abc6282c5d3 100644 --- a/wai-aria/role/roles.html +++ b/wai-aria/role/roles.html @@ -1,4 +1,5 @@ + Simple Core ARIA Role Verification Tests @@ -10,15 +11,18 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/wai-aria/role/synonym-roles.html b/wai-aria/role/synonym-roles.html index 0fea4a5864f729..34aafaa6b35ec0 100644 --- a/wai-aria/role/synonym-roles.html +++ b/wai-aria/role/synonym-roles.html @@ -30,12 +30,12 @@ promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('image')); - assert_true(role == "none"); + assert_true(role == "image"); }, "image role == computedrole image"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('img')); - assert_true(role == "none"); + assert_true(role == "image"); }, "synonym img role == computedrole image"); From 47e6e6577173365ba1a32442bd47ba82220887c5 Mon Sep 17 00:00:00 2001 From: James Craig Date: Fri, 10 Mar 2023 09:44:21 -0800 Subject: [PATCH 04/13] use assert_equals instead of assert_true --- wai-aria/role/basic.html | 4 ++-- wai-aria/role/region-roles.html | 4 ++-- wai-aria/role/roles.html | 2 +- wai-aria/role/synonym-roles.html | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wai-aria/role/basic.html b/wai-aria/role/basic.html index d371aa72dcba64..5cb838647015de 100644 --- a/wai-aria/role/basic.html +++ b/wai-aria/role/basic.html @@ -11,13 +11,13 @@

test heading

promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('d')); - assert_true(role == "group"); + assert_equals(role, "group"); }, "tests explicit role"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('h')); - assert_true(role == "heading"); + assert_equals(role, "heading"); }, "tests implicit role"); diff --git a/wai-aria/role/region-roles.html b/wai-aria/role/region-roles.html index d5213b48e87db1..a5abeb2bf7cf20 100644 --- a/wai-aria/role/region-roles.html +++ b/wai-aria/role/region-roles.html @@ -17,12 +17,12 @@ promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('no_label')); - assert_true(role == "generic"); + assert_equals(role, "generic"); }, "region with no label"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('label')); - assert_true(role == "region"); + assert_equals(role, "region"); }, "region with label"); diff --git a/wai-aria/role/roles.html b/wai-aria/role/roles.html index 4c4abc6282c5d3..b23e29c8f2804e 100644 --- a/wai-aria/role/roles.html +++ b/wai-aria/role/roles.html @@ -137,7 +137,7 @@ el.id = `role_${role}`; document.body.appendChild(el); const computedRole = await test_driver.get_computed_role(document.getElementById(el.id)); - assert_true(computedRole == role); + assert_equals(computedRole, role); }, `Assign/verify role: ${role}`); } diff --git a/wai-aria/role/synonym-roles.html b/wai-aria/role/synonym-roles.html index 34aafaa6b35ec0..58061bc8914884 100644 --- a/wai-aria/role/synonym-roles.html +++ b/wai-aria/role/synonym-roles.html @@ -20,22 +20,22 @@ promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('none')); - assert_true(role == "none"); + assert_equals(role, "none"); }, "none role == computedrole none"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('presentation')); - assert_true(role == "none"); + assert_equals(role, "none"); }, "synonym presentation role == computedrole none"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('image')); - assert_true(role == "image"); + assert_equals(role, "image"); }, "image role == computedrole image"); promise_test(async t => { const role = await test_driver.get_computed_role(document.getElementById('img')); - assert_true(role == "image"); + assert_equals(role, "image"); }, "synonym img role == computedrole image"); From 4216394999cc15d7f8318ca064e27fed06d2c21e Mon Sep 17 00:00:00 2001 From: James Craig Date: Fri, 10 Mar 2023 09:53:58 -0800 Subject: [PATCH 05/13] use tagName with implicit role to test non-generic fallback --- wai-aria/role/region-roles.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/wai-aria/role/region-roles.html b/wai-aria/role/region-roles.html index a5abeb2bf7cf20..7ba415d4461746 100644 --- a/wai-aria/role/region-roles.html +++ b/wai-aria/role/region-roles.html @@ -10,20 +10,20 @@ -
x
-
x
+