Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moves SVG image role test to a tentative file outside of the Interop 2024 focus area files, while dispute is resolved.
  • Loading branch information
cookiecrook committed Feb 7, 2024
1 parent 5407936 commit 0469626
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
33 changes: 33 additions & 0 deletions svg-aam/role/role-img.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html>
<head>
<title>SVG-AAM Image 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>Currently tentative due to <a href="https://github.com/w3c/svg-aam/issues/32">SVG-AAM #32: SVG image role should align with HTML on missing versus empty alt</a>.</p>

<!-- [sic] included here b/c the spec says unlabeled, unrendered images are generic, but the spec may be wrong. -->
<!-- Once https://github.com/w3c/svg-aam/issues/32 is resolved, this test can be moved to another file. -->
<image data-testname="el-image (missing alt attribute)" data-expectedrole="image" class="ex"></image>

<!-- Undisputed tests -->
<image data-testname="el-image (non-empty aria-label attribute)" aria-label="x" data-expectedrole="image" class="ex"></image>
<image data-testname="el-image (non-empty alt attribute)" alt="x" data-expectedrole="image" class="ex"></image>
<image data-testname="el-image (non-empty title attribute)" title="x" data-expectedrole="image" class="ex"></image>
<image data-testname="el-image (explicitly empty alt attribute)" alt="" class="ex-generic"></image>

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

</body>
</html>
6 changes: 1 addition & 5 deletions svg-aam/role/roles-generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ <h2>Simple Elements</h2>
<ellipse data-testname="el-ellipse" class="ex-generic"></ellipse>
<foreignObject data-testname="el-foreignObject" class="ex-generic"></foreignObject>
<g data-testname="el-g" class="ex-generic"></g>

<!-- [sic] included here b/c the spec says unlabeled, unrendered images are generic, but the spec is wrong. -->
<!-- Once https://github.com/w3c/svg-aam/issues/32 is resolved, this test can be moved to another file. -->
<image data-testname="el-image" data-expectedrole="image" class="ex"></image>

<!-- image -> in ./role-img.tentative.html -->
<line data-testname="el-line" class="ex-generic"></line>
<!-- skipped: mesh -->
<path data-testname="el-path" class="ex-generic"></path>
Expand Down

0 comments on commit 0469626

Please sign in to comment.