Skip to content

Commit

Permalink
Add notes pointing each test file to the relevant portion of the spec…
Browse files Browse the repository at this point in the history
… it tests. (web-platform-tests#40159)
  • Loading branch information
cookiecrook authored May 30, 2023
1 parent b939027 commit 93efd04
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 5 deletions.
2 changes: 2 additions & 0 deletions accname/name/comp_embedded_control.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_embedded_control">#comp_embedded_control</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<label>
<input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded textfield" class="ex">
Flash the screen
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_hidden_not_referenced.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_hidden_not_referenced">#comp_hidden_not_referenced</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<h2 class="ex" data-expectedlabel="heading label" data-testname="heading with interior hidden node">
heading
<span hidden>bogus</span>
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_host_language_label.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_host_language_label">#comp_host_language_label</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<label for="t">label</label>
<input id="t" data-expectedlabel="label" data-testname="host language: label[for] input[type=text]" class="ex">
<!-- Todo: test all remaining input types with label[for] -->
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_label.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_label">#comp_label</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<div aria-label="label" data-expectedlabel="label" data-testname="label valid on group" role="group" class="ex">x</div>

<!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_label -->
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_labelledby.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_labelledby">#comp_labelledby</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<div role="group" aria-labelledby="h" class="ex" data-expectedlabel="div group label" data-testname="div group explicitly labelledby heading">
<h2 id="h">div group label</h2>
<p>text inside div group</p>
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_name_from_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_name_from_content">#comp_name_from_content</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<h1 data-expectedlabel="label" data-testname="heading name from content" class="ex">label</h1>

<!--
Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_text_node.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_text_node">#comp_text_node</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<!-- I'm not certain whether #comp_text_node requires a lot of testing outside of the #comp_name_from_content contexts, -->
<!-- but I did think of one example where text node versus comment node may make a difference when joining text nodes with a space vs innerText. -->

Expand Down
2 changes: 2 additions & 0 deletions accname/name/comp_tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_tooltip">#comp_tooltip</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<a href="#" title="label" data-expectedlabel="label" data-testname="link label from tooltip" class="ex"><img src="#" alt=""></a>

<!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_tooltip -->
Expand Down
2 changes: 2 additions & 0 deletions accname/name/shadowdom/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<script src="/resources/testdriver-actions.js"></script>
<script src="/wai-aria/scripts/aria-utils.js"></script>

<p>Tests the basic shadow DOM portions of the AccName <em>Name Computation</em> algorithm, coming in <a href="https://github.com/w3c/accname/pull/167">ARIA #167</a>.</p>

<label id="label1">
<div id="host1"></div>
</label>
Expand Down
2 changes: 2 additions & 0 deletions accname/name/shadowdom/slot.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<script src="/resources/testdriver-actions.js"></script>
<script src="/wai-aria/scripts/aria-utils.js"></script>

<p>Tests the shadow DOM slots portions of the AccName <em>Name Computation</em> algorithm, coming in <a href="https://github.com/w3c/accname/pull/167">ARIA #167</a>.</p>

<label id="label1">
<div id="host1">slotted</div>
</label>
Expand Down
2 changes: 2 additions & 0 deletions graphics-aria/graphics-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</head>
<body>

<p>Tests the concrete roles defined in the <a href="https://www.w3.org/TR/graphics-aria-1.0/#role_definitions">ARIA Graphics Module</a> role definitions.</p>

<div role="graphics-document" data-expectedrole="graphics-document" class="ex">x</div>
<div role="graphics-object" data-expectedrole="graphics-object" class="ex">x</div>
<div role="graphics-symbol" data-expectedrole="graphics-symbol" class="ex">x</div>
Expand Down
5 changes: 4 additions & 1 deletion html-aam/roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
</head>
<body>

<!-- Most test names correspond to unique ID defined in the https://w3c.github.io/html-aam/ spec. -->

<p>Tests the computedrole mappings defined in <a href="https://w3c.github.io/html-aam/">HTML-AAM</a>. Most test names correspond to unique ID defined in the spec.<p>

<p>These should remain in alphabetical order, and include all HTML tagnames. If a tag is not tested here, include a pointer to the file where it is tested, such as: <code>&lt;!-- caption -&gt; ./table-roles.html --&gt;</code></p>

<a href="#" data-testname="el-a" data-expectedrole="link" class="ex">x</a>
<a data-testname="el-a-no-href" data-expectedrole="generic" class="ex">x</a>
Expand Down
2 changes: 2 additions & 0 deletions html-aam/table-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests the computedrole mappings for the table-related roles defined in <a href="https://w3c.github.io/html-aam/">HTML-AAM</a>. Most test names correspond to unique ID defined in the spec.<p>

<table data-testname="el-table" data-expectedrole="table" class="ex">
<caption data-testname="el-caption" data-expectedrole="caption" class="ex">caption</caption>
<thead data-testname="el-thead" data-expectedrole="rowgroup" class="ex">
Expand Down
3 changes: 2 additions & 1 deletion wai-aria/role/abstract-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<body>


<p>Verifies <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p>
<p>Tests <a href="https://w3c.github.io/aria/#abstract_roles">Abstract Roles</a> and related <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p>

<nav role="command" data-testname="command role" data-expectedrole="navigation" class="ex">x</nav>
<nav role="composite" data-testname="composite role" data-expectedrole="navigation" class="ex">x</nav>
<nav role="input" data-testname="input role" data-expectedrole="navigation" class="ex">x</nav>
Expand Down
4 changes: 2 additions & 2 deletions wai-aria/role/fallback-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
</head>
<body>

<p>Verifies Fallback Roles from <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p>
<p>Tests <a href="https://w3c.github.io/aria/#host_general_role">8.1 Role Attribute</a> role token list selection and <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a>.</p>

<nav role="region group" data-testname="fallback role w/ region with no label" data-expectedrole="group" class="ex">x</nav>
<nav role="region group" data-testname="fallback role w/ region with label" aria-label="x" data-expectedrole="region" class="ex">x</nav>

<!-- todo: additional fallback roles:
- valid/valid "switch checkbox"
- valid/invalid "foo group"
- invalid/valid "foo group"
- unicode char tests with fallback
- whitespace tests with fallback
- unicode char tests with fallback
Expand Down
2 changes: 1 addition & 1 deletion wai-aria/role/invalid-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- whitespace tests (including line breaks, tabs, zero-width space, braille space)
- diacritics
- joiners (e.g. like emoji variants use)
- zero-width joiners (e.g. ZWJ like emoji variants use)
- non-western chars
- RTL strings (Hebrew & Arabic)
- escaped chars, URL-encoded chars
Expand Down
2 changes: 2 additions & 0 deletions wai-aria/role/list-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests <a href="https://w3c.github.io/aria/#list">list</a> and related roles.</p>

<div role="list" data-testname="first simple list" data-expectedrole="list" class="ex">
<div role="listitem" data-testname="first simple listitem" data-expectedrole="listitem" class="ex">x</div>
<div role="listitem" data-testname="last simple listitem" data-expectedrole="listitem" class="ex">x</div>
Expand Down
2 changes: 2 additions & 0 deletions wai-aria/role/region-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests <a href="https://w3c.github.io/aria/#region">region</a> and related roles, as well as the "name from author" rule in <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a>.</p>

<!-- no label -->
<nav role="region" data-testname="region without label" data-expectedrole="navigation" class="ex">x</nav>

Expand Down
3 changes: 3 additions & 0 deletions wai-aria/role/roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<script src="/wai-aria/scripts/aria-utils.js"></script>
</head>
<body>

<p>Tests most <a href="https://w3c.github.io/aria/#role_definitions">ARIA role definitions</a>. See comments for more info.</p>

<script>

/*
Expand Down
2 changes: 2 additions & 0 deletions wai-aria/role/synonym-roles.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
</head>
<body>

<p>Tests synonym roles image/img and none/presentation via <a href="https://w3c.github.io/core-aam/#roleMappingComputedRole">Core-AAM Computed Role</a>.</p>

<!-- 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 -->
Expand Down

0 comments on commit 93efd04

Please sign in to comment.