diff options
Diffstat (limited to 'testing/web-platform/tests/wai-aria/role')
6 files changed, 39 insertions, 1 deletions
diff --git a/testing/web-platform/tests/wai-aria/role/grid-roles.html b/testing/web-platform/tests/wai-aria/role/grid-roles.html index c40771ba9f..2ca3705cf0 100644 --- a/testing/web-platform/tests/wai-aria/role/grid-roles.html +++ b/testing/web-platform/tests/wai-aria/role/grid-roles.html @@ -43,6 +43,12 @@ </div> </div> + <!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole + --> <span role="row" data-testname="orphaned row outside the context of table" class="ex-generic">x</span> <span role="rowgroup" data-testname="orphaned rowgroup outside the context of row" class="ex-generic">x</span> <div role="gridcell" data-testname="orphaned div with gridcell role outside the context of row" class="ex-generic">x</div> diff --git a/testing/web-platform/tests/wai-aria/role/list-roles.html b/testing/web-platform/tests/wai-aria/role/list-roles.html index 71c672c601..3fd3bfa0e6 100644 --- a/testing/web-platform/tests/wai-aria/role/list-roles.html +++ b/testing/web-platform/tests/wai-aria/role/list-roles.html @@ -18,11 +18,18 @@ <div role="listitem" data-testname="last simple listitem" data-expectedrole="listitem" class="ex">x</div> </div> +<!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole +--> <div role="listitem" data-testname="orphan div with listitem role" class="ex-generic">x</div> <p role="listitem" data-testname="orphan p with listitem role" data-expectedrole="paragraph" class="ex">x</p> <script> AriaUtils.verifyRolesBySelector(".ex"); +AriaUtils.verifyGenericRolesBySelector(".ex-generic"); </script> </body> diff --git a/testing/web-platform/tests/wai-aria/role/listbox-roles.html b/testing/web-platform/tests/wai-aria/role/listbox-roles.html index 5020822927..3d26f04d51 100644 --- a/testing/web-platform/tests/wai-aria/role/listbox-roles.html +++ b/testing/web-platform/tests/wai-aria/role/listbox-roles.html @@ -31,6 +31,12 @@ </li> </ul> +<!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole +--> <nav role="option" data-testname="orphaned option outside the context of listbox" data-expectedrole="navigation" class="ex">x </nav> diff --git a/testing/web-platform/tests/wai-aria/role/menu-roles.html b/testing/web-platform/tests/wai-aria/role/menu-roles.html index 4af4d8d2ff..fed15769ab 100644 --- a/testing/web-platform/tests/wai-aria/role/menu-roles.html +++ b/testing/web-platform/tests/wai-aria/role/menu-roles.html @@ -55,6 +55,12 @@ </div> </div> +<!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole +--> <nav role="menuitem" data-testname="orphaned menuitem outside the context of menu/menubar" data-expectedrole="navigation" class="ex">x </nav> @@ -76,6 +82,7 @@ <script> AriaUtils.verifyRolesBySelector(".ex"); + AriaUtils.verifyGenericRolesBySelector(".ex-generic"); </script> </body> diff --git a/testing/web-platform/tests/wai-aria/role/tab-roles.html b/testing/web-platform/tests/wai-aria/role/tab-roles.html index e3d14741c8..6561614dd8 100644 --- a/testing/web-platform/tests/wai-aria/role/tab-roles.html +++ b/testing/web-platform/tests/wai-aria/role/tab-roles.html @@ -82,12 +82,18 @@ <div role="tabpanel" data-testname="role is tabpanel as sibling to ul with child role none li elements" data-expectedrole="tabpanel" class="ex">Tab one's stuff</div> <div role="tabpanel" data-testname="role is tabpanel as sibling to ul with child role none li elements (duplicate)" data-expectedrole="tabpanel" class="ex">Tab two's stuff</div> -<!--orphan tab semantics --> +<!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole +--> <button role="tab" data-testname="orphan button with tab role" data-expectedrole="button" class="ex">x</button> <span role="tab" data-testname="orphan span with tab role" class="ex-generic">x</span> <script> AriaUtils.verifyRolesBySelector(".ex"); + AriaUtils.verifyGenericRolesBySelector(".ex-generic"); </script> </body> diff --git a/testing/web-platform/tests/wai-aria/role/tree-roles.html b/testing/web-platform/tests/wai-aria/role/tree-roles.html index eb1084040d..5d179fbcbf 100644 --- a/testing/web-platform/tests/wai-aria/role/tree-roles.html +++ b/testing/web-platform/tests/wai-aria/role/tree-roles.html @@ -102,6 +102,12 @@ </tbody> </table> +<!-- + CORE-AAM requires that, for elements with roles not contained in the + required context, user agents must ignore the role token and return the + computed role as if the ignored role token had not been included. + See https://w3c.github.io/core-aam/#roleMappingComputedRole +--> <nav role="treeitem" data-testname="orphaned treeitem outside the context of tree" data-expectedrole="navigation" class="ex">x</nav> <button role="treeitem" data-testname="orphaned button with treeitem role outside tree context" data-expectedrole="button" class="ex">x</button> |