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

Create figure-name-no-figcaption.tentative.html #49647

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
58 changes: 58 additions & 0 deletions html-aam/figure-name-no-figcaption.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!doctype html>
<html>
<head>
<title>HTML-AAM Figure Element Accessible Name From Author 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 the accName for elements defined in <a href="https://w3c.github.io/html-aam/#accessible-name-and-description-computation">HTML-AAM: Accessible Name Computations By HTML Element</a>.
These tests are meant to show whether an element returns a name per the naming mechanism used. See <a href="https://wpt.fyi/results/accname">wpt: accname</a> for expanded accName testing.</p>


<!--
The following test can be added to names.html along with the other figure naming tests when the file is no longer considered tentative.
-->

<h2>figure element</h2>
<figure data-testname="figure with figcaption - no name" data-expectedlabel="" class="ex">
cookiecrook marked this conversation as resolved.
Show resolved Hide resolved
x
<figcaption>y</figcaption>
</figure>

<figure data-testname="figure with figcaption and aria-label" aria-label="label" data-expectedlabel="label" class="ex">
x
<figcaption>y</figcaption>
</figure>

<figure data-testname="figure with figcaption and aria-labelledby pointing to another element" aria-labelledby="labelledby" data-expectedlabel="labelledby" class="ex">
x
<figcaption>y</figcaption>
</figure>

<figure data-testname="figure with aria-labelledby pointing to figcaption" aria-labelledby="fctest" data-expectedlabel="figcaption text" class="ex">
x
<figcaption id=fctest>figcaption text</figcaption>
</figure>

<figure data-testname="figure with figcaption and title" title="title" data-expectedlabel="title" class="ex">
cookiecrook marked this conversation as resolved.
Show resolved Hide resolved
x
<figcaption>y</figcaption>
</figure>


<!-- element to reference for aria-labelledby tests -->
<div id="labelledby">labelledby</div>

<script>
AriaUtils.verifyLabelsBySelector(".ex");
</script>

</body>
</html>