diff options
Diffstat (limited to 'testing/web-platform/tests/wai-aria/role/table-roles.html')
-rw-r--r-- | testing/web-platform/tests/wai-aria/role/table-roles.html | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/testing/web-platform/tests/wai-aria/role/table-roles.html b/testing/web-platform/tests/wai-aria/role/table-roles.html new file mode 100644 index 0000000000..6ffb94218d --- /dev/null +++ b/testing/web-platform/tests/wai-aria/role/table-roles.html @@ -0,0 +1,156 @@ +<!doctype html> +<html> + <head> + <title>Table Role Verification Tests</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/wai-aria/scripts/aria-utils.js"></script> + </head> +<body> + <p>Tests <a href="https://w3c.github.io/aria/#table">table</a> and related roles.</p> + +<!-- HTML <table> Elements Testing --> + + <!-- <caption> -> wpt/html-aam/table-roles.html --> + + <!-- <table> -> wpt/html-aam/table-roles.html --> + <!-- <tbody> -> wpt/html-aam/table-roles.html --> + + <!-- <td> -> wpt/html-aam/table-roles.html --> + + <!-- <tfoot> -> wpt/html-aam/table-roles.html --> + + <!-- <th> -> wpt/html-aam/table-roles.html --> + <!-- <thead> -> wpt/html-aam/table-roles.html --> + + <!-- <tr> -> wpt/html-aam/table-roles.html --> + + +<!-- ARIA Grid Elements Testing --> + + <!-- Grid roles tested in ./grid-roles.html --> + + +<!-- ARIA Table Roles Testing --> + + <!-- caption --> + <div role="table"> + <div role="caption" data-testname="div role is caption (in div with table role)" data-expectedrole="caption" class="ex">x</div> + </div> + + <p role="caption" data-testname="orphan p role is caption" data-expectedrole="caption" class="ex">x</p> + + <!-- cell --> + <div role="table"> + <div role="rowgroup"> + <div role="row"> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + </div> + </div> + <div role="rowgroup"> + <div role="row"> + <span role="cell" data-testname="span role is cell (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="cell" class="ex">x</span> + <span role="cell">x</span> + </div> + </div> + </div> + + <span role="cell" data-testname="orphan span role is cell" data-expectedrole="cell" class="ex">x</span> + + <!-- columnheader --> + <div role="table"> + <div role="rowgroup"> + <div role="row"> + <span role="columnheader" data-testname="span role is columnheader (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="columnheader" class="ex">x</span> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + </div> + </div> + <div role="rowgroup"> + <div role="row"> + <span role="rowheader">x</span> + <span role="cell">x</span> + <span role="cell">x</span> + </div> + </div> + </div> + + <!-- columnheader, orphaned -> ./grid-roles.html --> + + <!-- row --> + <div role="table"> + <div role="rowgroup"> + <div role="row" data-testname="div role is row (in div with rowgroup role, in div with table role)" data-expectedrole="row" class="ex"> + <span role="columnheader">x</span> + </div> + </div> + <div role="rowgroup"> + <div role="row"> + <span role="cell">x</span> + </div> + </div> + </div> + + <!-- row, orphaned -> ./grid-roles.html --> + + <!-- rowgroup --> + <div role="table"> + <div role="rowgroup" data-testname="div role is rowgroup (in div with table role)" data-expectedrole="rowgroup" class="ex"> + <div role="row"> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + </div> + </div> + <div role="rowgroup"> + <div role="row"> + <span role="cell">x</span> + <span role="cell">x</span> + </div> + </div> + </div> + + <!-- rowgroup, orphaned -> ./grid-roles.html --> + + <!-- rowheader --> + <div role="table"> + <div role="rowgroup"> + <div role="row"> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + </div> + </div> + <div role="rowgroup"> + <div role="row"> + <span role="rowheader" data-testname="role is rowheader (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="rowheader" class="ex">x</span> + <span role="cell">x</span> + <span role="cell">x</span> + <span role="cell">x</span> + </div> + </div> + </div> + + <!-- rowheader, orphaned -> ./grid-roles.html --> + + <!-- table --> + <div role="table" data-testname="div role is table" data-expectedrole="table" class="ex"> + <div role="row"> + <span role="columnheader">x</span> + <span role="columnheader">x</span> + </div> + <div role="row"> + <span role="cell">x</span> + <span role="cell">x</span> + </div> + </div> + +<script> + AriaUtils.verifyRolesBySelector(".ex"); +</script> + +</body> +</html>
\ No newline at end of file |