From 3365cae4a9f64c55d93b480a3b339d6821590efd Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Fri, 20 Dec 2024 14:47:48 +0900 Subject: [PATCH] Tests: Import more WPT ARIA tests (more regression coverage); no code --- .../wai-aria/role/abstract-roles.txt | 17 ++ .../wpt-import/wai-aria/role/basic.txt | 7 + .../wpt-import/wai-aria/role/button-roles.txt | 15 ++ .../wai-aria/role/contextual-roles.txt | 7 + .../wai-aria/role/generic-roles.txt | 6 + .../wpt-import/wai-aria/role/grid-roles.txt | 15 ++ .../wai-aria/role/invalid-roles.txt | 81 ++++++++++ .../wpt-import/wai-aria/role/list-roles.txt | 8 + .../wai-aria/role/listbox-roles.txt | 11 ++ .../wpt-import/wai-aria/role/tab-roles.txt | 42 +++++ .../wpt-import/wai-aria/role/tree-roles.txt | 12 ++ .../wai-aria/role/abstract-roles.html | 36 +++++ .../input/wpt-import/wai-aria/role/basic.html | 33 ++++ .../wai-aria/role/button-roles.html | 32 ++++ .../wai-aria/role/contextual-roles.html | 87 +++++++++++ .../wai-aria/role/generic-roles.html | 23 +++ .../wpt-import/wai-aria/role/grid-roles.html | 51 ++++++ .../wai-aria/role/invalid-roles.html | 135 ++++++++++++++++ .../wpt-import/wai-aria/role/list-roles.html | 26 ++++ .../wai-aria/role/listbox-roles.html | 39 +++++ .../wpt-import/wai-aria/role/tab-roles.html | 90 +++++++++++ .../wpt-import/wai-aria/role/tree-roles.html | 147 ++++++++++++++++++ 22 files changed, 920 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/abstract-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/basic.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/button-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/generic-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/grid-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/invalid-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/list-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/listbox-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tab-roles.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tree-roles.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/abstract-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/basic.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/button-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/generic-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/grid-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/invalid-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/list-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/listbox-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tab-roles.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tree-roles.html diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/abstract-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/abstract-roles.txt new file mode 100644 index 00000000000..6a923382941 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/abstract-roles.txt @@ -0,0 +1,17 @@ +Harness status: OK + +Found 12 tests + +12 Pass +Pass command role +Pass composite role +Pass input role +Pass landmark role +Pass range role +Pass roletype role +Pass section role +Pass sectionhead role +Pass select role +Pass structure role +Pass widget role +Pass window role \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/basic.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/basic.txt new file mode 100644 index 00000000000..2fb14a369f2 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/basic.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Pass +Pass tests explicit role +Pass tests implicit role \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/button-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/button-roles.txt new file mode 100644 index 00000000000..07874bd77f5 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/button-roles.txt @@ -0,0 +1,15 @@ +Harness status: OK + +Found 10 tests + +10 Pass +Pass button aria-haspopup false +Pass button aria-haspopup true +Pass button aria-haspopup menu +Pass button aria-haspopup dialog +Pass button aria-haspopup listbox +Pass button aria-haspopup tree +Pass button aria-haspopup grid +Pass button aria-pressed true +Pass button aria-pressed false +Pass button aria-pressed undefined \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.txt new file mode 100644 index 00000000000..ffda18bf0aa --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Pass +Pass footer scoped to body element is contentinfo +Pass contentinfo region scoped to body element is contentinfo \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/generic-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/generic-roles.txt new file mode 100644 index 00000000000..c33edfcb274 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/generic-roles.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass generic role on p element is generic \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/grid-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/grid-roles.txt new file mode 100644 index 00000000000..2da658d7d46 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/grid-roles.txt @@ -0,0 +1,15 @@ +Harness status: OK + +Found 10 tests + +10 Pass +Pass role is grid +Pass role is row (in grid) +Pass role is columnheader (in row, in grid) +Pass role is rowheader (in row, in grid) +Pass role is gridcell (in row, in grid) +Pass role is rowgroup (in grid) +Pass role is row (in rowgroup, in grid) +Pass role is columnheader (in row, in rowgroup, in grid) +Pass role is rowheader (in row, in rowgroup, in grid) +Pass role is gridcell (in row, in rowgroup, in grid) \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/invalid-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/invalid-roles.txt new file mode 100644 index 00000000000..d1767e29cb8 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/invalid-roles.txt @@ -0,0 +1,81 @@ +Harness status: OK + +Found 76 tests + +76 Pass +Pass nav with invalid role name foo +Pass nav with two invalid role names +Pass nav with three invalid role names +Pass button with invalid role name foo +Pass button with two invalid role names +Pass button with three invalid role names +Pass nav with empty character as role +Pass nav with line break ( ) character as role +Pass nav with tab ( ) as role (should be treated as whitespace) +Pass nav with zero-width space as role (should be treated as whitespace) +Pass nav with braille space (10240) as role +Pass nav with braille space (x2800) as role +Pass nav with non-breaking space (nbsp) as role +Pass nav with standard space (nbsp) as role +Pass link with role set to tilde diacritic +Pass link with role foo that has tilde diacritic +Pass link with role set to overline diacritic +Pass link with role foo that has overline diacritic +Pass link with role set to circumflex diacritic below +Pass link with role foo that has circumflex diacritic below +Pass link with role set to button with tilde diacritic +Pass button with role set to zero-width joiner +Pass button with role set to foo with zero-width joiner +Pass nav with role set to theta (Θ) +Pass nav with role set to Persian character (ژ) +Pass nav with multiple non-latin character roles, Persian character (ژ) and ♮ +Pass nav with role set to Japanese kanji +Pass nav with role set to Arabic text +Pass nav with multiple role assignments set to Arabic text +Pass nav with role set to Hebrew text +Pass nav with multiple role assignments set to Hebrew text +Pass link with role set to ampersand character +Pass link with role set to less than angle bracket character +Pass nav with role set to region followed by backslash +Pass nav with role set to backslash followed by region +Pass nav with role set to region with backslash after e character +Pass span with invalid role name foo +Pass span with two invalid role names +Pass span with three invalid role names +Pass div with invalid role name foo +Pass div with two invalid role names +Pass div with three invalid role names +Pass span with escaped empty character as role +Pass span with escaped line break ( ) character as role +Pass span with escaped tab ( ) as role (should be treated as whitespace) +Pass span with escaped zero-width space as role (should be treated as whitespace) +Pass span with escaped braille space (10240) as role +Pass span with escaped braille space (x2800) as role +Pass span with escaped non-breaking space (nbsp) as role +Pass span with escaped standard space (nbsp) as role +Pass span with empty character as role +Pass span with line break ( ) character as role +Pass span with tab ( ) as role (should be treated as whitespace) +Pass span with zero-width space as role (should be treated as whitespace) +Pass span with braille space (10240) as role +Pass span with non-breaking space (nbsp) as role +Pass span with standard space as role +Pass div with role set to tilde diacritic +Pass div with role foo that has tilde diacritic +Pass div with role set to button with tilde diacritic +Pass div with role set to button with unescaped tilde diacritic +Pass span with role set to theta (Θ) +Pass span with role set to Persian character (ژ) +Pass span with multiple non-latin character roles, Persian character (ژ) and ♮ +Pass span with role set to Japanese kanji +Pass div with role set to Arabic text +Pass div with multiple role assignments set to Arabic text +Pass div with role set to Hebrew text +Pass div with multiple role assignments set to Hebrew text +Pass span with role set to ampersand character +Pass span with role set to less than angle bracket character +Pass span with role set to unescaped ampersand character +Pass span with role set to unescaped less than angle bracket character +Pass span with role set to region followed by backslash +Pass span with role set to backslash followed by region +Pass span with role set to region with forward slash after e character \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/list-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/list-roles.txt new file mode 100644 index 00000000000..06ac2e5653a --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/list-roles.txt @@ -0,0 +1,8 @@ +Harness status: OK + +Found 3 tests + +3 Pass +Pass first simple list +Pass first simple listitem +Pass last simple listitem \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/listbox-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/listbox-roles.txt new file mode 100644 index 00000000000..88b81d58817 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/listbox-roles.txt @@ -0,0 +1,11 @@ +Harness status: OK + +Found 6 tests + +6 Pass +Pass div role is listbox +Pass role is option (in div listbox) +Pass role is group (in div listbox) +Pass role is option (in group, in div listbox) +Pass ul role is listbox +Pass li role is option (in ul listbox) \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tab-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tab-roles.txt new file mode 100644 index 00000000000..23b626b742d --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tab-roles.txt @@ -0,0 +1,42 @@ +Harness status: OK + +Found 37 tests + +37 Pass +Pass div role is tablist +Pass role is tab (in div tablist) +Pass role is tabpanel (with sibling div tablist) +Pass div role is tablist (with selection) +Pass role is tab and tab is selected +Pass role is tab and tab is not selected +Pass role is tabpanel (faux selected) +Pass role is tabpanel (faux unselected) +Pass div role is tablist (with selection, roving tabindex) +Pass role is tab, tab is selected and in tab order +Pass role is tab and tab is not selected, not tabbable +Pass role is tab and tab is not selected, not tabbable (duplicate) +Pass role is tabpanel with selection, roving tabindex +Pass role is tabpanel with selection, roving tabindex (duplicate) +Pass role is tabpanel with selection, roving tabindex (duplicate 2) +Pass div role is tablist (with non-empty tabpanel) +Pass role is tab and tab is selected (with non-empty tabpanel content) +Pass role is tab and tab is not selected (with non-empty tabpanel content) +Pass role is tabpanel with selection, non-empty content +Pass role is tabpanel with selection, non-empty content (duplicate) +Pass div role is tablist (with non-empty tabpanel and aria-controls) +Pass role is tab, tab is selected (with aria-controls) +Pass role is tab, tab is not selected (with aria-controls) +Pass role is tabpanel with aria-controls and non-empty content +Pass role is tabpanel with aria-controls and non-empty content (duplicate) +Pass div role for button parent container is tablist +Pass button role is tab (in div tablist) +Pass ul role is tablist +Pass role is tab (within li), tab is selected and in tab order +Pass role is tab (within li), tab is not selected and in tab order +Pass role is tabpanel as sibling to ul +Pass role is tabpanel as sibling to ul (duplicate) +Pass ul role is tablist (child li have role none) +Pass role is tab (within li with role none), tab is selected and in tab order +Pass role is tab (within li with role none), tab is not selected and in tab order +Pass role is tabpanel as sibling to ul with child role none li elements +Pass role is tabpanel as sibling to ul with child role none li elements (duplicate) \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tree-roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tree-roles.txt new file mode 100644 index 00000000000..dc8dab4f85b --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/tree-roles.txt @@ -0,0 +1,12 @@ +Harness status: OK + +Found 7 tests + +7 Pass +Pass role is tree +Pass role is treeitem (in tree) +Pass role is group (in treeitem) +Pass role is treeitem (in group, in treeitem) +Pass role is treegrid +Pass role is row (in treegrid) +Pass role is gridcell (in row, in treegrid) \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/abstract-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/abstract-roles.html new file mode 100644 index 00000000000..dc3c0ff2ff7 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/abstract-roles.html @@ -0,0 +1,36 @@ + + + + Abstract Role Verification Tests + + + + + + + + + + +

Tests Abstract Roles and related 9.1 Roles - handling author errors

+ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/basic.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/basic.html new file mode 100644 index 00000000000..84f68e4d24a --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/basic.html @@ -0,0 +1,33 @@ + + + + + + + + + +
+

test heading

+ diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/button-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/button-roles.html new file mode 100644 index 00000000000..a2fad02a2b1 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/button-roles.html @@ -0,0 +1,32 @@ + + + + Button-related Role Verification Tests + + + + + + + + + +

Tests button and related roles.

+ +
+
+
+
+
+
+
+
+
+
+ + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.html new file mode 100644 index 00000000000..9fec90ffde4 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.html @@ -0,0 +1,87 @@ + + + + Contextual Role Verification Tests + + + + + + + + + +

Verifies Required Accessibility Parent Roles from 5.2.7 Required Accessibility Parent Role

+

Also verifies Allowed Accessibility Child Roles from 5.2.6 Allowed Accessibility Child Roles

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/generic-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/generic-roles.html new file mode 100644 index 00000000000..1c19fc3a674 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/generic-roles.html @@ -0,0 +1,23 @@ + + + + Generic Role Verification Tests + + + + + + + + + +

Tests generic.

+ +

x

+ + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/grid-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/grid-roles.html new file mode 100644 index 00000000000..c838f17b864 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/grid-roles.html @@ -0,0 +1,51 @@ + + + + Grid Role Verification Tests + + + + + + + + + +

Tests grid and related roles.

+ + + +
+
+ x + x +
+
+ x + x +
+
+ +
+
+
+ x + x + x +
+
+
+
+ x + x + x +
+
+
+ + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/invalid-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/invalid-roles.html new file mode 100644 index 00000000000..66f72fe518f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/invalid-roles.html @@ -0,0 +1,135 @@ + + + + Invalid Role Verification Tests + + + + + + + + + + +

Tests invalid ARIA roles from 9.1 Roles - handling author errors.

+ + + + + + + + + + + + +x +x +x +
x
+
x
+
x
+ + + + + + + + + + + + +x +x +x +x +x +x +x +x + + + x + x + x + x + x + x + x + + +x +x +x +x +x +x +x + + +
x
+
x
+
x
+
x
+ + + + + + + + + + + + + +x +x +x +x + + + + + + + + +
x
+
x
+
x
+
x
+ + +x +x + + +x +x +x +x + + + + + + + +x +x +x + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/list-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/list-roles.html new file mode 100644 index 00000000000..7b185fbd1c8 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/list-roles.html @@ -0,0 +1,26 @@ + + + + List-related Role Verification Tests + + + + + + + + + +

Tests list and related roles.

+ +
+
x
+
x
+
+ + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/listbox-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/listbox-roles.html new file mode 100644 index 00000000000..aa0ec48737b --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/listbox-roles.html @@ -0,0 +1,39 @@ + + + + Listbox-related Role Verification Tests + + + + + + + + + +

Tests listbox and related roles.

+ +
+
x
+
+ x + x +
+
x
+
+ + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tab-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tab-roles.html new file mode 100644 index 00000000000..ca289466de8 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tab-roles.html @@ -0,0 +1,90 @@ + + + + Tab-related Role Verification Tests + + + + + + + + + +

Tests tab and related roles.

+ + +
+ +
+
+ + +
+ + +
+
+
+ + +
+ + + +
+
+
+
+ + +
+ + +
+
Tab one's stuff
+
Tab two's stuff
+ + +
+ + +
+
Tab one's stuff
+
Tab one's stuff
+ + +
+
+ + + + +
Tab one's stuff
+
Tab two's stuff
+ + + +
Tab one's stuff
+
Tab two's stuff
+ + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tree-roles.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tree-roles.html new file mode 100644 index 00000000000..43f8e97741c --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/tree-roles.html @@ -0,0 +1,147 @@ + + + + Tree related Role Verification Tests + + + + + + + + + + +

Tests tree and related roles.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xxx
xxx
+ + + + + \ No newline at end of file