From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- testing/web-platform/tests/html-aam/META.yml | 4 + .../tests/html-aam/fragile/area-role.html | 26 +++ .../tests/html-aam/fragile/optgroup-role.html | 30 +++ testing/web-platform/tests/html-aam/names.html | 260 +++++++++++++++++++++ .../tests/html-aam/roles-contextual.html | 81 +++++++ .../roles-dynamic-switch.tentative.window.js | 71 ++++++ .../web-platform/tests/html-aam/roles-generic.html | 43 ++++ testing/web-platform/tests/html-aam/roles.html | 206 ++++++++++++++++ .../tests/html-aam/roles.tentative.html | 26 +++ .../web-platform/tests/html-aam/table-roles.html | 53 +++++ 10 files changed, 800 insertions(+) create mode 100644 testing/web-platform/tests/html-aam/META.yml create mode 100644 testing/web-platform/tests/html-aam/fragile/area-role.html create mode 100644 testing/web-platform/tests/html-aam/fragile/optgroup-role.html create mode 100644 testing/web-platform/tests/html-aam/names.html create mode 100644 testing/web-platform/tests/html-aam/roles-contextual.html create mode 100644 testing/web-platform/tests/html-aam/roles-dynamic-switch.tentative.window.js create mode 100644 testing/web-platform/tests/html-aam/roles-generic.html create mode 100644 testing/web-platform/tests/html-aam/roles.html create mode 100644 testing/web-platform/tests/html-aam/roles.tentative.html create mode 100644 testing/web-platform/tests/html-aam/table-roles.html (limited to 'testing/web-platform/tests/html-aam') diff --git a/testing/web-platform/tests/html-aam/META.yml b/testing/web-platform/tests/html-aam/META.yml new file mode 100644 index 0000000000..212cae7fa5 --- /dev/null +++ b/testing/web-platform/tests/html-aam/META.yml @@ -0,0 +1,4 @@ +spec: https://w3c.github.io/html-aam/ +suggested_reviewers: + - cookiecrook + - scottaohara diff --git a/testing/web-platform/tests/html-aam/fragile/area-role.html b/testing/web-platform/tests/html-aam/fragile/area-role.html new file mode 100644 index 0000000000..315d4a8e83 --- /dev/null +++ b/testing/web-platform/tests/html-aam/fragile/area-role.html @@ -0,0 +1,26 @@ + + + + HTMLAreaElement Role Verification Tests + + + + + + + + + + + x + x + +x + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html-aam/fragile/optgroup-role.html b/testing/web-platform/tests/html-aam/fragile/optgroup-role.html new file mode 100644 index 0000000000..f36a5d6983 --- /dev/null +++ b/testing/web-platform/tests/html-aam/fragile/optgroup-role.html @@ -0,0 +1,30 @@ + + + + HTMLOptGroupElement Role Verification Tests + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html-aam/names.html b/testing/web-platform/tests/html-aam/names.html new file mode 100644 index 0000000000..cd32fde5c7 --- /dev/null +++ b/testing/web-platform/tests/html-aam/names.html @@ -0,0 +1,260 @@ + + + + HTML-AAM Element Accessible Name From Author Tests + + + + + + + + + + +

Tests the accName for elements defined in HTML-AAM: Accessible Name Computations By HTML Element. + These tests are meant to show whether an element returns a name per the naming mechanism used. See wpt: accname for expanded accName testing.

+ + + + + +

address element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + + +

aside element

+ + + + + + + + + + + + + +

blockquote element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + + +

details element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

figure element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

footer element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

form element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

hgroup element

+

x

y

+ +

x

y

+

x

y

+

x

y

+ +

x

y

+

x

y

+ +

x

y

+

x

y

+ + +

hr element

+
+ +
+
+
+ +
+
+ +
+
+ + +

ol element

+
  1. x
+ +
  1. x
+
  1. x
+
  1. x
+ +
  1. x
+
  1. x
+ +
  1. x
+
  1. x
+ + +

main element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

menu element

+
  • x
  • + +
  • x
  • +
  • x
  • +
  • x
  • + +
  • x
  • +
  • x
  • + +
  • x
  • +
  • x
  • + + +

    nav element

    + + + + + + + + + + + + + +

    search element

    +x + +x +x +x + +x +x + +x +x + + +

    section element

    +
    x
    + +
    x
    +
    x
    +
    x
    + +
    x
    +
    x
    + +
    x
    +
    x
    + + +

    ul element

    + + + + + + + + + + + + + + +
    labelledby
    + + + + + diff --git a/testing/web-platform/tests/html-aam/roles-contextual.html b/testing/web-platform/tests/html-aam/roles-contextual.html new file mode 100644 index 0000000000..200fed7e75 --- /dev/null +++ b/testing/web-platform/tests/html-aam/roles-contextual.html @@ -0,0 +1,81 @@ + + + + HTML-AAM Contextual-Specific Role Verification Tests + + + + + + + + + + +

    Tests contextual computedrole mappings defined in HTML-AAM, where the returned computed role is expected to change based on the context. Most test names correspond to a unique ID defined in the spec.

    + +

    These should remain in alphabetical order.

    + + + +x +x + + + +
    + +
    + + +
    +
    +
    + + +
    + + + +
    + + +
    + + + +
    x
    + + + +
    x
    +
    +
    x
    +
    + + +
    x
    +
    x
    + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html-aam/roles-dynamic-switch.tentative.window.js b/testing/web-platform/tests/html-aam/roles-dynamic-switch.tentative.window.js new file mode 100644 index 0000000000..2993c36764 --- /dev/null +++ b/testing/web-platform/tests/html-aam/roles-dynamic-switch.tentative.window.js @@ -0,0 +1,71 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +// META: script=/resources/testdriver-actions.js + +promise_test(async () => { + const control = document.createElement("input"); + control.type = "checkbox"; + control.switch = true; + const role = await test_driver.get_computed_role(control); + assert_equals(role, ""); +}, `Disconnected `); + +promise_test(async t => { + const control = document.createElement("input"); + t.add_cleanup(() => control.remove()); + control.type = "checkbox"; + control.switch = true; + document.body.append(control); + const role = await test_driver.get_computed_role(control); + assert_equals(role, "switch"); +}, `Connected `); + +promise_test(async t => { + const control = document.createElement("input"); + t.add_cleanup(() => control.remove()); + control.type = "checkbox"; + document.body.append(control); + let role = await test_driver.get_computed_role(control); + assert_equals(role, "checkbox"); + control.switch = true; + role = await test_driver.get_computed_role(control); + assert_equals(role, "switch"); +}, `Connected : adding switch attribute`); + +promise_test(async t => { + const control = document.createElement("input"); + t.add_cleanup(() => control.remove()); + control.type = "checkbox"; + control.switch = true; + document.body.append(control); + let role = await test_driver.get_computed_role(control); + assert_equals(role, "switch"); + control.switch = false; + role = await test_driver.get_computed_role(control); + assert_equals(role, "checkbox"); +}, `Connected : removing switch attribute`); + +promise_test(async t => { + const control = document.createElement("input"); + t.add_cleanup(() => control.remove()); + control.type = "checkbox"; + document.body.append(control); + control.switch = true; + let role = await test_driver.get_computed_role(control); + assert_equals(role, "switch"); + control.removeAttribute("type"); + role = await test_driver.get_computed_role(control); + assert_equals(role, "textbox"); +}, `Connected : removing type attribute`); + +promise_test(async t => { + const control = document.createElement("input"); + t.add_cleanup(() => control.remove()); + control.switch = true; + document.body.append(control); + let role = await test_driver.get_computed_role(control); + assert_equals(role, "textbox"); + control.type = "checkbox"; + role = await test_driver.get_computed_role(control); + assert_equals(role, "switch"); +}, `Connected : adding type attribute`); diff --git a/testing/web-platform/tests/html-aam/roles-generic.html b/testing/web-platform/tests/html-aam/roles-generic.html new file mode 100644 index 0000000000..e6ff46b066 --- /dev/null +++ b/testing/web-platform/tests/html-aam/roles-generic.html @@ -0,0 +1,43 @@ + + + + HTML-AAM Generic Role Verification Tests + + + + + + + + + + +

    Tests ONLY the generic mappings defined in HTML-AAM. Most test names correspond to a unique ID defined in the spec.

    + +

    These should remain in alphabetical order by tagname.

    + + + +x +x +x +x +
    x
    + + +x +
  • x
  • +
    x
    +x +x + +x +x +x + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html-aam/roles.html b/testing/web-platform/tests/html-aam/roles.html new file mode 100644 index 0000000000..7cfb2852c2 --- /dev/null +++ b/testing/web-platform/tests/html-aam/roles.html @@ -0,0 +1,206 @@ + + + + HTML-AAM Role Verification Tests + + + + + + + + + + +

    Tests the computedrole mappings defined in HTML-AAM. Most test names correspond to a unique ID defined in the spec.

    + +

    These should remain in alphabetical order, and include all HTML tagnames. If a tag is not tested here, include a pointer to the file where it is tested, such as: <!-- caption -> ./table-roles.html -->

    + + + + +
    x
    + +
    x
    + + + + + + + +
    x
    + + + + + + +x + + + + + + +
    +
    x
    +
    x
    +
    + +x +
    xx
    +x + + + + +
    +
    x
    +
    x
    +
    + +x + +
    x
    + +
    x
    x
    + +
    + + + +

    x

    +

    x

    +

    x

    +

    x

    +
    x
    +
    x
    + + + + +

    x

    +
    + + + +x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +x + + + + + + + +
    1. x
    2. x
    + + +
    x
    + +x + +
  • x
  • + +x + + + +
    1. x
    2. x
    + + + + + + +x +

    x

    + + + +x + + + + +x + + +x + + + + + + + + + + + +x + +x + +x + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/html-aam/roles.tentative.html b/testing/web-platform/tests/html-aam/roles.tentative.html new file mode 100644 index 0000000000..a3eb850497 --- /dev/null +++ b/testing/web-platform/tests/html-aam/roles.tentative.html @@ -0,0 +1,26 @@ + + + + HTML-AAM Role Verification Tests + + + + + + + + + + +

    Tests the computedrole mappings defined in HTML-AAM. Most test names correspond to a unique ID defined in the spec.

    + +

    These should remain in alphabetical order, and include all HTML tagnames. If a tag is not tested here, include a pointer to the file where it is tested, such as: <!-- caption -> ./table-roles.html -->

    + + + + + + + diff --git a/testing/web-platform/tests/html-aam/table-roles.html b/testing/web-platform/tests/html-aam/table-roles.html new file mode 100644 index 0000000000..a81caa3d3f --- /dev/null +++ b/testing/web-platform/tests/html-aam/table-roles.html @@ -0,0 +1,53 @@ + + + + HTML-AAM Role Verification Tests + + + + + + + + + +

    Tests the computedrole mappings for the table-related roles defined in HTML-AAM. Most test names correspond to unique ID defined in the spec.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    caption
    abc
    123
    456
    xyz
    + + + + + \ No newline at end of file -- cgit v1.2.3