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

NameFrom: Heading... WG preferred DFS over IDS/IDDFS search #50507

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
64 changes: 64 additions & 0 deletions accname/name/comp_name_from_heading.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<!doctype html>
<html>
<head>
<title>Name Comp: Name From Heading</title>
<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>
<p>Includes <a href="https://github.com/w3c/aria/pull/1860">tentative "name from heading" diff</a>.</p>

<!-- ARIA roles. -->
<div role="alertdialog" data-expectedlabel="alertdialog role heading contents" data-testname="alertdialog role, name from heading" class="ex-label">
<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-label">
<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-label">
<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-label">
<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-label">
cookiecrook marked this conversation as resolved.
Show resolved Hide resolved
<h2>dialog heading contents</h2>
<p>More dialog content.</p>
</dialog>


<!-- Depth first search (DFS) tests (standard DFS rather than iterative-deepening depth-first search IDDFS/IDS) -->
<!-- Note: The WG wanted change this from the initially proposed IDS to DFS, but IDS is more performant, so we'll need multiple implementor buy-in for the selection. -->
Comment on lines +49 to +50
Copy link
Contributor Author

@cookiecrook cookiecrook Feb 5, 2025

Choose a reason for hiding this comment

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

Reviewers... This test is the only substantive change since last year's approved PR... I updated to match the WG's preference for a depth-first-search rather than the alternative IDS/IDDFS.

<div role="article" data-expectedlabel="article role simple DFS" data-testname="article role, name from DFS heading" class="ex-label">
<div role="group">
<h3>article role simple DFS</h3>
</div>
<h2>Not this one</h2>
<p>More article content.</p>
</div>


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