Skip to content

Commit

Permalink
Bug 1821745 [wpt PR 38941] - new synonym role tests, a=testonly
Browse files Browse the repository at this point in the history
Automatic update from web-platform-tests
Synonym role tests for wai-aria (#38941)

Asserts computedrole for ARIA Core-AAM role synonyms
 - image/img
 - none/presentation
 - list/directory

Related Issues:
 - web-platform-tests/interop-accessibility#10
 - w3c/core-aam#166

Supporting Spec Change:
 - w3c/core-aam#167

Implementation Changes:
 - WebKit: https://webkit.org/b/224617
 - Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1428763

Reviewed By:
 - spectranaut: Valerie Young (Igalia)

--

wpt-commits: 0b1a0be7ff72257eb0f2bb4a7227824e5c40761d
wpt-pr: 38941
  • Loading branch information
cookiecrook authored and moz-wptsync-bot committed Apr 14, 2023
1 parent a0a62f1 commit 554451b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions testing/web-platform/tests/wai-aria/role/synonym-roles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<title>Region 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>

<!-- spec resolution https://github.com/w3c/core-aam/issues/166 -->

<div role="none" id="none" data-expectedrole="none" data-testname="none role == computedrole none" class="ex">x</div><!-- preferred -->
<div role="presentation" id="presentation" data-expectedrole="none" data-testname="synonym presentation role == computedrole none" class="ex">x</div><!-- synonym -->

<div role="image" id="image" data-expectedrole="image" data-testname="image role == computedrole image" class="ex">x</div><!-- preferred -->
<div role="img" id="img" data-expectedrole="image" data-testname="synonym img role == computedrole image" class="ex">x</div><!-- synonym -->

<!-- `directory` synonym deprecated in ARIA 1.2; these examples should all return computedrole `list` -->
<ul role="list" id="list2" data-expectedrole="list" data-testname="list role == computedrole list" class="ex"><li>x</li></ul>
<ul role="directory" id="directory" data-expectedrole="list" data-testname="directory role == computedrole list" class="ex"><li>x</li></ul>
<div role="directory" id="div" data-expectedrole="list" data-testname="div w/directory role == computedrole list" class="ex"><div role="listitem">x</div></div>

<script>
AriaUtils.verifyRolesBySelector(".ex");
</script>
</body>
</html>

0 comments on commit 554451b

Please sign in to comment.