Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pattern for role none/generic match. #42203

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion html-aam/fragile/area-role.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@

<map name="areamap">
<area shape="rect" coords="0,0,15,15" href="#" alt="x" data-testname="el-area" data-expectedrole="link" class="ex">
<area shape="rect" coords="15,15,31,31" alt="x" data-testname="el-area-no-href" data-expectedrole="generic" class="ex">
<area shape="rect" coords="15,15,31,31" alt="x" data-testname="el-area-no-href" class="ex-generic">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI reviewers, this PR just updates a few older tests that expect a specific role match with the implementation-specific acceptable alternates ["none" | "generic" | ""] as agreed upon in web-platform-tests/interop-accessibility#48

</map>
<img usemap="#areamap" src="#" style="width: 32px; height: 32px;" alt="x">

<script>
AriaUtils.verifyRolesBySelector(".ex");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>

</body>
Expand Down
5 changes: 3 additions & 2 deletions html-aam/roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h6 data-testname="el-h6" data-expectedrole="heading" class="ex">x</h6>
<img src="#" alt="x" data-testname="el-img" data-expectedrole="image" class="ex">

<!-- Implementations might also be valid if ignored rather than returning 'none' for the following images. -->
<img src="#" alt data-testname="el-img-alt-no-value" data-expectedrole="none" class="ex">
<img src="#" alt="" data-testname="el-img-empty-alt" data-expectedrole="none" class="ex">
<img src="#" alt data-testname="el-img-alt-no-value" class="ex-generic">
<img src="#" alt="" data-testname="el-img-empty-alt" class="ex-generic">

<input type="button" value="x" data-testname="el-input-button" data-expectedrole="button" class="ex">
<input type="checkbox" data-testname="el-input-checkbox" data-expectedrole="checkbox" class="ex">
Expand Down Expand Up @@ -199,6 +199,7 @@ <h6 data-testname="el-h6" data-expectedrole="heading" class="ex">x</h6>

<script>
AriaUtils.verifyRolesBySelector(".ex");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>

</body>
Expand Down
7 changes: 4 additions & 3 deletions wai-aria/role/grid-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
</div>
</div>

<div role="gridcell" data-testname="orphaned gridcell outside the context of row" data-expectedrole="none" class="ex">x</div>
<div role="rowheader" data-testname="orphaned rowheader outside the context of row" data-expectedrole="none" class="ex">x</div>
<div role="columnheader" data-testname="orphaned columnheader outside the context of row" data-expectedrole="none" class="ex">x</div>
<div role="gridcell" data-testname="orphaned gridcell outside the context of row" class="ex-generic">x</div>
<div role="rowheader" data-testname="orphaned rowheader outside the context of row" class="ex-generic">x</div>
<div role="columnheader" data-testname="orphaned columnheader outside the context of row" class="ex-generic">x</div>

<script>
AriaUtils.verifyRolesBySelector(".ex");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>

</body>
Expand Down
7 changes: 4 additions & 3 deletions wai-aria/role/role_none_conflict_resolution.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@ <h1 role="none" data-testname="heading role none with global attr aria-label" da

<!-- none with label(global) on paragraph -->
<p role="none" data-testname="p role none with global attr aria-label (prohibited role)" data-expectedrole="paragraph" aria-label="x" class="ex">x</p>
<p role="none" data-testname="p role none without global attr aria-label (prohibited role)" data-expectedrole="none" class="ex">x</p>
<p role="none" data-testname="p role none without global attr aria-label (prohibited role)" class="ex-generic">x</p>

<!-- none with focusable header -->
<h1 role="none" data-testname="focusable heading role none with tabindex=0" data-expectedrole="heading" tabindex="0" class="ex">x</h1>
<h1 role="none" data-testname="focusable heading role none with tabindex=-1" data-expectedrole="heading" tabindex="-1" class="ex">x</h1>
<h1 role="none" data-testname="non-focusable heading role none" data-expectedrole="none" class="ex">x</h1>
<h1 role="none" data-testname="non-focusable heading role none" class="ex-generic">x</h1>

<!-- none with non-global-->
<h1 role="none" data-testname="none with non-global" data-expectedrole="none" class="ex" aria-level="2"> Sample Content </h1>
<h1 role="none" data-testname="none with non-global" class="ex-generic" aria-level="2"> Sample Content </h1>


<script>
AriaUtils.verifyRolesBySelector(".ex");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>

</body>
Expand Down
5 changes: 3 additions & 2 deletions wai-aria/role/synonym-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<!-- 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="none" id="none" data-testname="none role == computedrole none" class="ex-generic">x</div><!-- preferred -->
<div role="presentation" id="presentation" data-testname="synonym presentation role == computedrole none" class="ex-generic">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 -->
Expand All @@ -28,6 +28,7 @@

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