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

ARIA WG Agenda+ new namefrom: heading tests for accname #44490

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 2 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
63 changes: 63 additions & 0 deletions accname/name/comp_name_from_heading.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!doctype html>
<html>
<head>
<title>Name Comp: Name From Content</title>
MelSumner marked this conversation as resolved.
Show resolved Hide resolved
<meta charset="utf-8">
<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 <a href="https://w3c.github.io/accname/#comp_name_from_heading">#comp_name_from_heading</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<!-- ARIA roles. -->
<div role="alertdialog" data-expectedlabel="alertdialog role heading contents" data-testname="alertdialog role, name from heading" class="ex">
<h2>alertdialog role heading contents</h2>
<p>More alertdialog content.</p>
</div>

<div role="article" data-expectedlabel="article role heading contents" data-testname="article role, name from heading" class="ex">
<h2>article role heading contents</h2>
<p>More article content.</p>
</div>

<div role="dialog" data-expectedlabel="dialog role heading contents" data-testname="dialog role, name from heading" class="ex">
<h2>dialog role heading contents</h2>
<p>More dialog content.</p>
</div>

<div role="group" data-expectedlabel="" data-testname="group role, verify name is NOT from heading" class="ex">
<div role="group">
<h3>Not this one</h3>
</div>
<h2>nor this one</h2>
<p>Nor this content.</p>
</div>

<!-- Native HTML elements. -->
<dialog open data-expectedlabel="dialog heading contents" data-testname="dialog, name from heading" class="ex">
<h2>dialog heading contents</h2>
<p>More dialog content.</p>
</dialog>


<!-- iterative deepening depth first search tests (IDS or IDDFS rather than standard DFS) -->
<!-- Note: It's possible the WG will want to change this from IDS to DFS, but IDS is more performant, so we'll need implementor buy-in for the selection. -->
<div role="article" data-expectedlabel="article role simple IDS" data-testname="article role, name from IDDFS heading" class="ex">
<div role="group">
<h3>Not this one</h3>
</div>
<h2>article role simple IDS</h2>
<p>More article content.</p>
</div>


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