summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/accname/name
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/accname/name')
-rw-r--r--testing/web-platform/tests/accname/name/ReadMe.md60
-rw-r--r--testing/web-platform/tests/accname/name/comp_embedded_control.html134
-rw-r--r--testing/web-platform/tests/accname/name/comp_hidden_not_referenced.html92
-rw-r--r--testing/web-platform/tests/accname/name/comp_host_language_label.html154
-rw-r--r--testing/web-platform/tests/accname/name/comp_label.html247
-rw-r--r--testing/web-platform/tests/accname/name/comp_labelledby.html60
-rw-r--r--testing/web-platform/tests/accname/name/comp_labelledby_hidden_nodes.html245
-rw-r--r--testing/web-platform/tests/accname/name/comp_name_from_content.html271
-rw-r--r--testing/web-platform/tests/accname/name/comp_text_node.html154
-rw-r--r--testing/web-platform/tests/accname/name/comp_tooltip.html69
-rw-r--r--testing/web-platform/tests/accname/name/shadowdom/basic.html37
-rw-r--r--testing/web-platform/tests/accname/name/shadowdom/slot.html60
12 files changed, 1583 insertions, 0 deletions
diff --git a/testing/web-platform/tests/accname/name/ReadMe.md b/testing/web-platform/tests/accname/name/ReadMe.md
new file mode 100644
index 0000000000..be95525853
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/ReadMe.md
@@ -0,0 +1,60 @@
+
+## Breakdown of AccName Name Computation files...
+
+Portions of the AccName algorithm are referenced via unique IDs such as `comp_labelledby` and `comp_embedded_control`. This ReadMe lists those sections (and subsections) in order as they appear in [AccName Computation Steps](https://w3c.github.io/accname/#computation-steps).
+
+In order to make the WPT test files digestible and understandable, the tests are broken up more or less in the structure of the algorithm, with the file struction listed below. Sub-section test (such as `comp_labelledby_recursion`) are tested as part of the main section `comp_labelledby` in [comp_labelledby.html](comp_labelledby.html).
+
+Non-name portions of the AccName spec (such as Descripton Computation) should be tested in another directory.
+
+If a new section of the AccName algorithm is added, please list it here when checking in new tests. Thanks.
+
+### No-Op (no test files)
+- comp_init
+- comp_computation
+
+### [comp_hidden_not_referenced](comp_hidden_not_referenced.html)
+
+### [comp_labelledby](comp_labelledby.html)
+ - comp_labelledby_reset
+ - comp_labelledby_foreach
+ - comp_labelledby_set_current
+ - comp_labelledby_recursion
+ - comp_labelledby_append
+ - comp_labelledby_return
+
+### [comp_embedded_control](comp_embedded_control.html)
+ - comp_embedded_control_textbox
+ - comp_embedded_control_combobox_or_listbox
+ - comp_embedded_control_range
+ - comp_embedded_control_range_valuetext
+ - comp_embedded_control_range_valuenow
+ - comp_embedded_control_range_host_language_value
+
+### [comp_label](comp_label.html)
+
+### [comp_host_language_label](comp_host_language_label.html)
+
+### [comp_name_from_content](comp_name_from_content.html)
+ - comp_name_from_content_reset
+ - comp_name_from_content_pseudo_element
+ - comp_name_from_content_pseudo_element_before
+ - comp_name_from_content_pseudo_element_after
+ - comp_name_from_content_for_each_child
+ - comp_name_from_content_for_each_child_set_current
+ - comp_name_from_content_for_each_child_recursion
+ - comp_for_each_child_append
+ - comp_name_from_content_return
+
+### [comp_text_node](comp_text_node.html)
+
+### comp_recursive_name_from_content (tested with [comp_name_from_content](comp_name_from_content.html))
+
+### [comp_tooltip](comp_tooltip.html)
+
+### No-Op (no test files)
+ - comp_append
+ - comp_complete
+
+
+
diff --git a/testing/web-platform/tests/accname/name/comp_embedded_control.html b/testing/web-platform/tests/accname/name/comp_embedded_control.html
new file mode 100644
index 0000000000..2cdb5cbdf7
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_embedded_control.html
@@ -0,0 +1,134 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Embedded Control</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 <a href="https://w3c.github.io/accname/#comp_embedded_control">#comp_embedded_control</a> portions of the AccName <em>Name Computation</em> algorithm.</p>
+
+<!-- Textfield (textbox) -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded textfield" class="ex">
+ Flash the screen
+ <input value="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded textfield inside checkbox label" class="ex"> times
+</label>
+<br><br>
+
+<!-- HTML select:not([size]) element renders as menu button (on Mac) or single-row listbox (on Windows/Linux) -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded select:not([size])" class="ex">
+ Flash the screen
+ <select aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded select:not([size]) inside checkbox label" class="ex">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3" selected>3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ </select>
+ times
+</label>
+<br><br>
+
+<!-- HTML select[size] element renders as multi-row listbox -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded select[size]" class="ex">
+ Flash the screen
+ <select size=5 aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded select[size] inside checkbox label" class="ex">
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3" selected>3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ </select>
+ times
+</label>
+<br><br>
+
+<!-- ARIA combobox examples (not interactive) -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (input[type=text])" class="ex">
+ Flash the screen
+ <input role="combobox" value="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded combobox (input[type=text]) inside checkbox label" class="ex"> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (span)" class="ex">
+ Flash the screen
+ <span role="combobox" tabindex="0" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded combobox (span) inside checkbox label" class="ex">3</span> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (div)" class="ex">
+ Flash the screen
+ <div style="display: inline-block;" role="combobox" tabindex="0" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded combobox (div) inside checkbox label" class="ex">3</div> times
+</label>
+<br><br>
+<!-- Todo: we may want another combobox example using aria-activedescendant? -->
+
+
+<!-- ARIA listbox examples (not interactive) -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded listbox>option[aria-selected=true]" class="ex">
+ Flash the screen
+ <ul role="listbox" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded listbox>option[aria-selected=true] inside checkbox label" class="ex" style="padding:0; list-style:none; border: solid 1px gray; width: 15em; display: inline-block;">
+ <li role="option" tabindex="-1" style="padding:0.2em 0.8em; list-style:none;">1</li>
+ <li role="option" tabindex="-1" style="padding:0.2em 0.8em; list-style:none;">2</li>
+ <li role="option" tabindex="0" aria-selected="true" style="padding:0.2em 0.8em; list-style:none; color: white; background-color: #555;">3</li>
+ <li role="option" tabindex="-1" style="padding:0.2em 0.8em; list-style:none;">4</li>
+ <li role="option" tabindex="-1" style="padding:0.2em 0.8em; list-style:none;">5</li>
+ </ul> times
+</label>
+<br><br>
+
+
+<!-- Ranges: HTML native and ARIA sliders and steppers (valuetext, valuenow, host language specific) -->
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded input[type=range]" class="ex">
+ Flash the screen
+ <input type ="range" min="1" max="5" value="3" step="1" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded input[type=range] inside checkbox label" class="ex"> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded input[type=number]" class="ex">
+ Flash the screen
+ <input type ="number" min="1" max="5" value="3" step="1" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded input[type=number] inside checkbox label" class="ex"> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA slider (aria-valuenow)" class="ex">
+ Flash the screen
+ <span tabindex="0" role="slider" aria-valuemin="1" aria-valuemax="5" aria-valuenow="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded ARIA slider (aria-valuenow) inside checkbox label" class="ex">3.0</span> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA slider (aria-valuetext)" class="ex">
+ Flash the screen
+ <span tabindex="0" role="slider" aria-valuemin="1.0" aria-valuemax="5.0" aria-valuenow="3.0" aria-valuetext="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded ARIA slider (aria-valuetext) inside checkbox label" class="ex">3.0</span> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA spinbutton (aria-valuenow)" class="ex">
+ Flash the screen
+ <span tabindex="0" role="spinbutton" aria-valuemin="1" aria-valuemax="5" aria-valuenow="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded ARIA spinbutton (aria-valuenow) inside checkbox label" class="ex">3.0</span> times
+</label>
+<br><br>
+<label>
+ <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA spinbutton (aria-valuetext)" class="ex">
+ Flash the screen
+ <span tabindex="0" role="spinbutton" aria-valuemin="1.0" aria-valuemax="5.0" aria-valuenow="3.0" aria-valuetext="3" aria-label="number of times" data-expectedlabel="number of times" data-testname="label of embedded ARIA spinbutton (aria-valuetext) inside checkbox label" class="ex">3.0</span> times
+</label>
+<br><br>
+
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_hidden_not_referenced.html b/testing/web-platform/tests/accname/name/comp_hidden_not_referenced.html
new file mode 100644
index 0000000000..7d9cf2c36f
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_hidden_not_referenced.html
@@ -0,0 +1,92 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Name Comp: Hidden Not Referenced</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 <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>
+
+<button
+ class="ex"
+ data-expectedlabel="visible to all users"
+ data-testname="button containing a rendered, unreferenced element that is aria-hidden=true, an unreferenced element with the hidden host language attribute, and an unreferenced element that is unconditionally rendered"
+>
+ <span aria-hidden="true">hidden,</span>
+ <span hidden>hidden from all users,</span>
+ <span>visible to all users</span>
+</button>
+
+<button
+ class="ex"
+ data-expectedlabel="hidden but referenced,"
+ data-testname="button labelled by element that is aria-hidden=true"
+ aria-labelledby="button-label-2"
+>
+ <span aria-hidden="true" id="button-label-2">hidden but referenced,</span>
+ <span hidden>hidden from all users,</span>
+ <span>visible to all users</span>
+</button>
+
+<button
+ class="ex"
+ data-expectedlabel="hidden from all users but referenced,"
+ data-testname="button labelled by element with the hidden host language attribute"
+ aria-labelledby="button-label-3"
+>
+ <span aria-hidden="true">hidden,</span>
+ <span hidden id="button-label-3">hidden from all users but referenced,</span>
+ <span>visible to all users</span>
+</button>
+
+<a
+ class="ex"
+ data-testname="link labelled by elements with assorted visibility and a11y tree exposure"
+ data-expectedlabel="visible to all users, hidden but referenced, hidden from all users but referenced"
+ href="#"
+ aria-labelledby="link-label-1a link-label-1b link-label-1c"
+>
+ <span id="link-label-1a">
+ <span>visible to all users,</span>
+ <span aria-hidden="true">hidden,</span>
+ </span>
+ <span aria-hidden="true" id="link-label-1b">hidden but referenced,</span>
+ <span hidden id="link-label-1c">hidden from all users but referenced</span>
+</a>
+
+<h2
+ class="ex"
+ data-testname="heading with name from content, containing element that is visibility:hidden with nested content that is visibility:visible"
+ data-expectedlabel="visible to all users, un-hidden for all users"
+>
+ visible to all users,
+ <span style="visibility: hidden;">
+ hidden from all users,
+ <span style="visibility: visible;">un-hidden for all users</span>
+ </span>
+</h2>
+
+<!-- TODO: Test cases once https://github.com/w3c/aria/issues/1256 resolved: -->
+<!-- - button labelled by an element that is aria-hidden=true which contains a nested child that is aria-hidden=false -->
+<!-- - button labelled by an element that is aria-hidden=false which belongs to a parent that is aria-hidden=true -->
+<!-- - heading with name from content, containing rendered content that is aria-hidden=true with nested, rendered content that is aria-hidden=false -->
+<!-- - heading with name from content, containing element with the hidden host language attribute with nested content that is aria-hidden=false -->
+
+<!-- TODO: New test case?
+<!-- What is the expectation for a details element when it’s given an -->
+<!-- explicit role that allows name from contents (e.g., `comment`) -->
+<!-- but is also not in the open state, and therefore has contents -->
+<!-- that are both not rendered and excluded from the a11y tree. -->
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/accname/name/comp_host_language_label.html b/testing/web-platform/tests/accname/name/comp_host_language_label.html
new file mode 100644
index 0000000000..b07566a56d
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_host_language_label.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Host Language Label</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>
+
+<h1>AccName: Host Language Label Tests</h1>
+<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>
+
+<h2>HTML input with value, alt, etc.</h2>
+<input type="button" value="button label" data-expectedlabel="button label" data-testname="html: input[type=button]" class="ex">
+<input type="image" alt="image input label" data-expectedlabel="image input label" data-testname="html: input[type=image]" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+<input type="reset" value="reset label" data-expectedlabel="reset label" data-testname="html: input[type=reset]" class="ex">
+<input type="submit" value="submit label" data-expectedlabel="submit label" data-testname="html: input[type=submit]" class="ex">
+
+
+<h2>HTML input label/for</h2>
+<!-- above: input[type=button] -->
+<label for="cb">checkbox label</label><input id="cb" type="checkbox" data-expectedlabel="checkbox label" data-testname="html: label[for] input[type=checkbox]" class="ex"><br>
+<label for="co">color label</label><input id="co" type="color" data-expectedlabel="color label" data-testname="html: label[for] input[type=color]" class="ex"><br>
+<label for="da">date label</label><input id="da" type="date" data-expectedlabel="date label" data-testname="html: label[for] input[type=date]" class="ex"><br>
+<label for="dtl">datetime-local label</label><input id="dtl" type="date" data-expectedlabel="datetime-local label" data-testname="html: label[for] input[type=datetime-local]" class="ex"><br>
+<label for="em">email label</label><input id="em" type="email" data-expectedlabel="email label" data-testname="html: label[for] input[type=email]" class="ex"><br>
+
+<!-- todo: results for input[type=file] currently differ in all engines -->
+<!--
+<label for="fi">file label</label><input id="fi" type="file" data-expectedlabel="file label" data-testname="html: label[for] input[type=file]" class="ex"><br>
+-->
+
+<!-- skipped: input[type=hidden] for/id n/a -->
+<!-- above: input[type=image] -->
+<label for="mo">month label</label><input id="mo" type="month" data-expectedlabel="month label" data-testname="html: label[for] input[type=month]" class="ex"><br>
+<label for="n">number label</label><input id="n" type="number" data-expectedlabel="number label" data-testname="html: label[for] input[type=number]" class="ex"><br>
+<label for="pw">password label</label><input id="pw" type="password" data-expectedlabel="password label" data-testname="html: label[for] input[type=password]" class="ex"><br>
+<label for="ra">radio label</label><input id="ra" type="radio" data-expectedlabel="radio label" data-testname="html: label[for] input[type=radio]" class="ex"><br>
+<label for="rng">range label</label><input id="rng" type="range" data-expectedlabel="range label" data-testname="html: label[for] input[type=range]" class="ex"><br>
+<!-- input[type=reset] above -->
+<label for="search">search label</label><input id="search" type="search" data-expectedlabel="search label" data-testname="html: label[for] input[type=search]" class="ex"><br>
+<!-- input[type=submit] above -->
+<label for="tel">tel label</label><input id="tel" type="tel" data-expectedlabel="tel label" data-testname="html: label[for] input[type=tel]" class="ex"><br>
+<label for="t">textfield label</label><input id="t" type="text" data-expectedlabel="textfield label" data-testname="html: label[for] input[type=text]" class="ex"><br>
+<label for="time">time label</label><input id="time" type="time" data-expectedlabel="time label" data-testname="html: label[for] input[type=time]" class="ex"><br>
+<label for="url">url label</label><input id="url" type="url" data-expectedlabel="url label" data-testname="html: label[for] input[type=url]" class="ex"><br>
+<label for="week">week label</label><input id="week" type="week" data-expectedlabel="week label" data-testname="html: label[for] input[type=week]" class="ex"><br>
+
+
+<h2>HTML input label encapsulation</h2>
+<!-- above: input[type=button] -->
+<label><input type="checkbox" data-expectedlabel="checkbox label" data-testname="html: label input[type=checkbox] encapsulation" class="ex">checkbox label</label><br>
+<label><input type="color" data-expectedlabel="color label" data-testname="html: label input[type=color] encapsulation" class="ex">color label</label><br>
+<label><input type="date" data-expectedlabel="date label" data-testname="html: label input[type=date] encapsulation" class="ex">date label</label><br>
+<label><input type="datetime-local" data-expectedlabel="datetime-local label" data-testname="html: label input[type=datetime-local] encapsulation" class="ex">datetime-local label</label><br>
+<label><input type="email" data-expectedlabel="email label" data-testname="html: label input[type=email] encapsulation" class="ex">email label</label><br>
+
+<!-- todo: results for input[type=file] currently differ in all engines -->
+<!--
+<label><input type="file" data-expectedlabel="file label" data-testname="html: label input[type=file] encapsulation" class="ex">file label</label><br>
+-->
+
+<!-- skipped: input[type=hidden] n/a -->
+<!-- above: input[type=image] -->
+<label><input type="month" data-expectedlabel="month label" data-testname="html: label input[type=month] encapsulation" class="ex">month label</label><br>
+<label><input type="number" data-expectedlabel="number label" data-testname="html: label input[type=number] encapsulation" class="ex">number label</label><br>
+<label><input type="password" data-expectedlabel="password label" data-testname="html: label input[type=password] encapsulation" class="ex">password label</label><br>
+<label><input type="radio" data-expectedlabel="radio label" data-testname="html: label input[type=radio] encapsulation" class="ex">radio label</label><br>
+<label><input type="range" data-expectedlabel="range label" data-testname="html: label input[type=range] encapsulation" class="ex">range label</label><br>
+<!-- above: input[type=reset] -->
+<label><input type="search" data-expectedlabel="search label" data-testname="html: label input[type=search] encapsulation" class="ex">search label</label><br>
+<!-- above: input[type=submit] -->
+<label><input type="tel" data-expectedlabel="tel label" data-testname="html: label input[type=tel] encapsulation" class="ex">tel label</label><br>
+<label><input type="text" data-expectedlabel="textfield label" data-testname="html: label[for] input[type=text] encapsulation" class="ex">textfield label</label><br>
+<label><input type="time" data-expectedlabel="time label" data-testname="html: label input[type=time] encapsulation" class="ex">time label</label><br>
+<label><input type="url" data-expectedlabel="url label" data-testname="html: label input[type=url] encapsulation" class="ex">url label</label><br>
+<label><input type="week" data-expectedlabel="week label" data-testname="html: label input[type=week] encapsulation" class="ex">week label</label><br>
+
+
+<!-- skipped: skip textarea for v1 since all engines fail in different ways. need to verify label/textarea is expected. -->
+<!--
+<h2>HTML textarea</h2>
+<label for="ta">textarea label</label><textarea data-expectedlabel="textarea label" data-testname="html: label[for] textarea" class="ex"></textarea><br>
+<label for="ta">textarea label<textarea data-expectedlabel="textarea label" data-testname="html: textarea encapsulation" class="ex"></textarea></label><br>
+-->
+
+
+<h2>HTML select</h2>
+<!-- todo: select for/id -->
+<label for="select">select label</label>
+<select id="select" data-expectedlabel="select label" data-testname="html: select for/id" class="ex">
+ <option>foo</option>
+</select>
+<br>
+<!-- select encapsulation -->
+<label>
+ select label
+ <select data-expectedlabel="select label" data-testname="html: select encapsulation" class="ex">
+ <option>foo</option>
+ </select>
+</label><br>
+<!-- todo: select labeled by selected option. All engines currently fail in different ways. Not sure which is correct. -->
+<!--
+<select data-expectedlabel="select label" data-testname="html: select w/selected option" class="ex">
+ <option>foo</option>
+ <option selected>select label</option>
+ <option>bar</option>
+</select>
+<br>
+-->
+
+
+<h2>HTML img/picture</h2>
+<!-- skipped: img:not([alt]) -->
+<!-- skipped: img[alt=""] -->
+<img alt="image label" data-expectedlabel="image label" data-testname="html: img[alt] (non-empty)" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+<picture>
+ <source srcset="#">
+ <img alt="picture label" data-expectedlabel="picture label" data-testname="html: picture > img[alt] (non-empty)" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+</picture>
+<!-- elsewhere: image map area alt -> ./fragile/area-alt.html -->
+
+
+<h2>HTML fieldset/legend</h2>
+<fieldset data-expectedlabel="fieldset legend label" data-testname="html: fieldset > legend" class="ex">
+ <legend>fieldset legend label</legend>
+ <input type="text"><br>
+</fieldset>
+
+
+<h2>HTML table/caption</h2>
+<table data-expectedlabel="table caption label" data-testname="html: table > caption" class="ex">
+ <caption>table caption label</caption>
+ <tr><th>a</th><th>b</th><th>c</th></tr>
+ <tr><th>1</th><td>2</td><td>3</td></tr>
+</table>
+
+
+<!-- SVG: -> /svg-aam/name/ -->
+
+
+<!-- todo: Ruby? -->
+<!-- todo: MathML? -->
+<!-- todo: does HTML input[placeholder="foo"] count as a host language labeling mechanism? -->
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_label.html b/testing/web-platform/tests/accname/name/comp_label.html
new file mode 100644
index 0000000000..8b569ba6ff
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_label.html
@@ -0,0 +1,247 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Label</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>
+
+<h1>AccName: Label Tests</h1>
+<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>
+
+<!-- https://www.w3.org/TR/wai-aria/#namefromauthor -->
+
+<!-- Embedded controls tested in ./comp_embedded_control.html -->
+
+<h2>Elements with roles that support aria-label use</h2>
+<!-- https://www.w3.org/TR/wai-aria/#namefromauthor -->
+
+<div role="alert" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with alert role" class="ex">x</div>
+<div role="alertdialog" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with alertdialog role" class="ex">x</div>
+<div role="application" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with application role" class="ex">x</div>
+<div role="article" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with article role" class="ex">x</div>
+<div role="associationlist" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with associationlist role" class="ex">x</div>
+<div role="associationlistitemkey" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with associationlistitemkey role" class="ex">x</div>
+<div role="associationlistitemvalue" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with associationlistitemvalue role" class="ex">x</div>
+<div role="banner" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with banner role" class="ex">x</div>
+<div role="blockquote" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with blockquote role" class="ex">x</div>
+<div role="button" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with button role" class="ex">x</div>
+<div role="cell" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with cell role" class="ex">x</div>
+<div role="checkbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with checkbox role" class="ex">x</div>
+<div role="columnheader" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with columnheader role" class="ex">x</div>
+<div role="combobox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with combobox role" class="ex">x</div>
+<div role="complementary" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with complementary role" class="ex">x</div>
+<div role="contentinfo" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with contentinfo role" class="ex">x</div>
+<div role="dialog" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with dialog role" class="ex">x</div>
+<div role="directory" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with directory role" class="ex">x</div>
+<div role="document" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with document role" class="ex">x</div>
+<div role="feed" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with feed role" class="ex">x</div>
+<div role="figure" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with figure role" class="ex">x</div>
+<div role="form" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with form role" class="ex">x</div>
+<div role="grid" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with grid role" class="ex">x</div>
+<div role="gridcell" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with gridcell role" class="ex">x</div>
+<div role="group" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with group role" class="ex">x</div>
+<div role="heading" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with heading role" class="ex">x</div>
+<div role="img" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with img role" class="ex">x</div>
+<div role="link" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with link role" class="ex">x</div>
+<div role="list" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with list role" class="ex">x</div>
+<div role="listbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with listbox role" class="ex">x</div>
+<div role="listitem" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with listitem role" class="ex">x</div>
+<div role="log" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with log role" class="ex">x</div>
+<div role="main" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with main role" class="ex">x</div>
+<div role="marquee" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with marquee role" class="ex">x</div>
+<div role="math" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with math role" class="ex">x</div>
+<div role="menu" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with menu role" class="ex">x</div>
+<div role="menubar" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with menubar role" class="ex">x</div>
+<div role="menuitem" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with menuitem role" class="ex">x</div>
+<div role="menuitemcheckbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with menuitemcheckbox role" class="ex">x</div>
+<div role="menuitemradio" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with menuitemradio role" class="ex">x</div>
+<div role="meter" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with meter role" class="ex">x</div>
+<div role="navigation" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with navigation role" class="ex">x</div>
+<div role="note" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with note role" class="ex">x</div>
+<div role="option" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with option role" class="ex">x</div>
+<div role="progressbar" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with progressbar role" class="ex">x</div>
+<div role="radio" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with radio role" class="ex">x</div>
+<div role="radiogroup" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with radiogroup role" class="ex">x</div>
+<div role="region" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with region role" class="ex">x</div>
+<div role="row" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with row role" class="ex">x</div>
+<div role="rowgroup" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with rowgroup role" class="ex">x</div>
+<div role="rowheader" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with rowheader role" class="ex">x</div>
+<div role="scrollbar" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with scrollbar role" class="ex">x</div>
+<div role="search" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with search role" class="ex">x</div>
+<div role="searchbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with searchbox role" class="ex">x</div>
+<div role="separator" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with separator role" class="ex">x</div>
+<div role="slider" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with slider role" class="ex">x</div>
+<div role="spinbutton" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with spinbutton role" class="ex">x</div>
+<div role="status" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with status role" class="ex">x</div>
+<div role="switch" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with switch role" class="ex">x</div>
+<div role="tab" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with tab role" class="ex">x</div>
+<div role="table" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with table role" class="ex">x</div>
+<div role="tablist" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with tablist role" class="ex">x</div>
+<div role="tabpanel" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with tabpanel role" class="ex">x</div>
+<div role="textbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with textbox role" class="ex">x</div>
+<div role="timer" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with timer role" class="ex">x</div>
+<div role="toolbar" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with toolbar role" class="ex">x</div>
+<div role="tooltip" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with tooltip role" class="ex">x</div>
+<div role="tree" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with tree role" class="ex">x</div>
+<div role="treegrid" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with treegrid role" class="ex">x</div>
+<div role="treeitem" aria-label="label" data-expectedlabel="label" data-testname="label valid on div with treeitem role" class="ex">x</div>
+
+<h2>HTML elements that support aria-label</h2>
+<!-- aria-label permitted on "all elements of the base markup" with exceptions: https://w3c.github.io/aria/#aria-label -->
+
+<a href="" aria-label="label" data-expectedlabel="label" data-testname="label valid on link element" class="ex">x</a>
+<article aria-label="label" data-expectedlabel="label" data-testname="label valid on article element" class="ex">x</article>
+<aside aria-label="label" data-expectedlabel="label" data-testname="label valid on aside element" class="ex">x</aside>
+<blockquote aria-label="label" data-expectedlabel="label" data-testname="label valid on blockquote element" class="ex">x</blockquote>
+<button aria-label="label" data-expectedlabel="label" data-testname="label valid on button element" class="ex">x</button>
+<dd aria-label="label" data-expectedlabel="label" data-testname="label valid on dd element" class="ex">x</dd>
+<dl aria-label="label" data-expectedlabel="label" data-testname="label valid on dl element" class="ex">x</dl>
+<dt aria-label="label" data-expectedlabel="label" data-testname="label valid on dt element" class="ex">x</dt>
+<footer aria-label="label" data-expectedlabel="label" data-testname="label valid on footer element" class="ex">x</footer>
+<fieldset aria-label="label" data-expectedlabel="label" data-testname="label valid on fieldset element" class="ex">x</fieldset>
+<figure aria-label="label" data-expectedlabel="label" data-testname="label valid on figure element" class="ex">x</figure>
+<form action="" aria-label="label" data-expectedlabel="label" data-testname="label valid on form element" class="ex">x</form>
+<header aria-label="label" data-expectedlabel="label" data-testname="label valid on header element" class="ex">x</header>
+<h1 aria-label="label" data-expectedlabel="label" data-testname="label valid on h1 element" class="ex">x</h1>
+<h2 aria-label="label" data-expectedlabel="label" data-testname="label valid on h2 element" class="ex">x</h2>
+<h3 aria-label="label" data-expectedlabel="label" data-testname="label valid on h3 element" class="ex">x</h3>
+<h4 aria-label="label" data-expectedlabel="label" data-testname="label valid on h4 element" class="ex">x</h4>
+<h5 aria-label="label" data-expectedlabel="label" data-testname="label valid on h5 element" class="ex">x</h5>
+<h6 aria-label="label" data-expectedlabel="label" data-testname="label valid on h6 element" class="ex">x</h6>
+<hr aria-label="label" data-expectedlabel="label" data-testname="label valid on hr element" class="ex" />
+<img alt="" aria-label="label" data-expectedlabel="label" data-testname="label valid on img element" class="ex" />
+<input type="checkbox" aria-label="label" data-expectedlabel="label" data-testname="label valid on input type checkbox element" class="ex"/>
+<input type="radio" aria-label="label" data-expectedlabel="label" data-testname="label valid on input type radio element" class="ex" />
+<input type="search" aria-label="label" data-expectedlabel="label" data-testname="label valid on input type search element" class="ex" />
+<input type="text" aria-label="label" data-expectedlabel="label" data-testname="label valid on input type text element" class="ex" />
+<li aria-label="label" data-expectedlabel="label" data-testname="label valid on listitem element" class="ex">x</li>
+<main aria-label="label" data-expectedlabel="label" data-testname="label valid on main element" class="ex">x</main>
+<math aria-label="label" data-expectedlabel="label" data-testname="label valid on math element" class="ex">x</math>
+<meter aria-label="label" data-expectedlabel="label" data-testname="label valid on meter element" class="ex">x</meter>
+<nav aria-label="label" data-expectedlabel="label" data-testname="label valid on nav element" class="ex">x</nav>
+<ol aria-label="label" data-expectedlabel="label" data-testname="label valid on list (ordered) element" class="ex">x</ol>
+<section aria-label="label" data-expectedlabel="label" data-testname="label valid on section element" class="ex">x</section>
+<select aria-label="label" data-expectedlabel="label" data-testname="label valid on select element" class="ex">x</select>
+<select>
+ <option aria-label="label" value="foo" data-expectedlabel="label" data-testname="label valid on option element" class="ex">x</option>
+</select>
+<table aria-label="label" data-expectedlabel="label" data-testname="label valid on table element" class="ex">
+ <thead aria-label="label" data-expectedlabel="label" data-testname="label valid on thead element" class="ex">
+ <tr>
+ <th scope="col" aria-label="label" data-expectedlabel="label" data-testname="label valid on th element with the scope of col" class="ex">x</th>
+ <th scope="row" aria-label="label" data-expectedlabel="label" data-testname="label valid on th (scope row) element" class="ex">x</th>
+ </tr>
+ </thead>
+ <tbody aria-label="label" data-expectedlabel="label" data-testname="label valid on tbody element" class="ex">
+ <tr aria-label="label" data-expectedlabel="label" data-testname="label valid on tr element" class="ex">
+ <td aria-label="label" data-expectedlabel="label" data-testname="label valid on td element" class="ex">x</td>
+ <td>x</td>
+ </tr>
+ </tbody>
+ <tfoot aria-label="label" data-expectedlabel="label" data-testname="label valid on tfoot element" class="ex">
+ <tr>
+ <td>x</td>
+ <td>x</td>
+ </tr>
+ </tfoot>
+</table>
+<textarea aria-label="label" data-expectedlabel="label" data-testname="label valid on textarea element" class="ex">x</textarea>
+<ul aria-label="label" data-expectedlabel="label" data-testname="label valid on list (unordered) element" class="ex">x</ul>
+
+<h2>Undefined aria-label tests</h2>
+<img alt="alt" aria-label="undefined" data-expectedlabel="alt" data-testname="aria-label undefined on img w/ alt" class="ex" />
+<img aria-label="undefined" data-expectedlabel="" data-testname="aria-label undefined on img w/o alt" class="ex" />
+<img alt="" aria-label="undefined" data-expectedlabel="" data-testname="aria-label undefined on img w/ empty alt" class="ex" />
+<img aria-label="undefined" data-expectedlabel="title" data-testname="aria-label undefined on img w/o alt but w/ title" class="ex" />
+<img alt="" aria-label="undefined" data-expectedlabel="title" data-testname="aria-label undefined on img w/ empty alt but w/ title" class="ex" />
+
+<h2>Name computation precedence tests</h2>
+<!-- Name computation: https://w3c.github.io/accname/#computation-steps -->
+
+<!-- Step 2A: Hidden Not Referenced supercedes 2D: AriaLabel, also see wpt/accname/name/comp_hidden_not_referenced.html -->
+<button aria-labelledby="span1" aria-label="foo" data-expectedlabel="label" data-testname="button's hidden referenced name (display:none) supercedes aria-label" class="ex">
+ <span id="span1" style="display:none;">
+ <span id="span2" style="display:none;">label</span>
+ </span>
+x
+</button>
+
+<button aria-labelledby="span3" aria-label="foo" data-expectedlabel="label" data-testname="button's hidden referenced name (visibility:hidden) supercedes aria-label" class="ex">
+ <span id="span3" style="visibility:hidden;">
+ <span id="span4" style="visibility:hidden;">label</span>
+ </span>
+ x
+</button>
+
+<button aria-labelledby="span4" aria-label="foo" data-expectedlabel="foo" data-testname="button's hidden referenced name (visibility:hidden) with hidden aria-labelledby traversal falls back to aria-label" class="ex">
+ <span id="span4">
+ <span id="span5" style="visibility:hidden;">label</span>
+ </span>
+ x
+</button>
+
+<!-- Step 2B: LabelledBy supercedes 2D: AriaLabel, also see wpt/accname/name/comp_labelledby.html -->
+<a href="#" aria-labelledby="span6" aria-label="foo" data-expectedlabel="label" data-testname="link's aria-labelledby name supercedes aria-label" class="ex">x</a>
+<span id="span6">label</span>
+
+<!-- Step 2C: Embedded Control labelling supercedes 2D: AriaLabel, see wpt/accname/name/comp_embedded_control.html -->
+
+<!-- Step 2E: Host Language Label is superceded by 2D: AriaLabel, also see wpt/accname/name/comp_host_language_label.html -->
+<img alt="alt" aria-label="foo" data-expectedlabel="foo" data-testname="img's aria-label supercedes alt attribute" class="ex" />
+
+<svg aria-label="foo" data-expectedlabel="foo" data-testname="svg's aria-label supercedes title tag" class="ex">
+ <circle cx="5" cy="5" r="4">
+ <title>circle</title>
+ </circle>
+</svg>
+
+<label for="input1">label</label>
+<input type="text" id="input1" aria-label="foo" data-expectedlabel="foo" data-testname="input with label for association is superceded by aria-label" class="ex" />
+
+<!-- Step 2F: Name From Content is superceded by 2D: AriaLabel, also see wpt/accname/name/comp_name_from_content.html -->
+<button aria-label="label" data-expectedlabel="label" data-testname="button name from contents is superceded by aria-label" class="ex">x</button>
+
+<!-- Step 2G: Text Node is superceded by 2D: AriaLabel, also see wpt/accname/name/comp_text_node.html -->
+<h1 aria-label="label" data-expectedlabel="label" data-testname="h1 text is superceded by aria-label" class="ex">x</h1>
+
+<!-- Step 2H: Recursive Name from Content, see wpt/accname/name/comp_name_from_content.html -->
+
+<!-- Step 2I: Tooltip is superceded by 2D: AriaLabel, also see wpt/accname/name/comp_tooltip.html -->
+<button aria-label="label" title="foo" data-expectedlabel="label" data-testname="button with title is superceded by aria-label" class="ex">x</button>
+
+<h2>Empty/whitespace aria-label tests</h2>
+<!--
+- AccName computation links to the following definition of "Whitespace": https://infra.spec.whatwg.org/#ascii-whitespace
+- Generally, if the current node has an aria-label attribute whose value is not the empty string (including when trimmed of whitespace), return the value of aria-label.
+
+Note: PR for computedLabel whitespace trimming in aria-utils.js: https://github.com/web-platform-tests/wpt/pull/42407/files#diff-6870d82f11ff11cf7c7b544756cecfdac2046acbfe2fbb0640e6d415fbf99916
+
+-->
+
+<textarea aria-label="label " data-expectedlabel="label" data-testname="textarea's name with trailing whitespace in aria-label is valid" class="ex">x</textarea>
+<a href="#" aria-label=" label" data-expectedlabel="label" data-testname="link's name with leading whitespace in aria-label is valid" class="ex">x</a>
+<button aria-label="⠀" data-expectedlabel="⠀" data-testname="button with blank braille pattern has name as such (not treated as whitespace per Unicode standard)" class="ex">my button</button>
+<div role="alert" aria-label="
+alert message" data-expectedlabel="alert message" data-testname="div with role alert and carriage return in aria-label is valid" class="ex">x</div>
+<a href="#" aria-label=" label" data-expectedlabel="label" data-testname="link's name with tab in aria-label is valid" class="ex">x</a>
+<button aria-label=" label" data-expectedlabel="label" data-testname="button with leading form feed control character in aria-label is valid" class="ex">my button</button>
+<nav aria-label="label&nbsp;" data-expectedlabel="label&nbsp;" data-testname="nav with trailing nbsp char aria-label is valid (nbsp is preserved in name)" class="ex">x</nav>
+<button aria-label="&nbsp;label" data-expectedlabel="&nbsp;label" data-testname="button with leading nbsp char in aria-label is valid (and uses aria-label)" class="ex">my button</button>
+
+<button aria-label="" data-testname="button with empty aria-label does not use aria-label as name" data-expectedlabel="my button" class="ex">my button</button>
+<textarea aria-label=" " title="title" data-testname="textarea with tab character as aria-label does not use aria-label as name" data-expectedlabel="title" class="ex">textarea contents</textarea>
+<button aria-label="
+" data-testname="button with carriage return as aria-label does not use aria-label as name" data-expectedlabel="my button" class="ex">my button</button>
+<button aria-label=" " data-testname="button with space characters as aria-label does not use aria-label as name" data-expectedlabel="my button" class="ex">my button</button>
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_labelledby.html b/testing/web-platform/tests/accname/name/comp_labelledby.html
new file mode 100644
index 0000000000..2a22fd8919
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_labelledby.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Labelledby</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 <a href="https://w3c.github.io/accname/#comp_labelledby">#comp_labelledby</a> portions of the AccName <em>Name Computation</em> algorithm.</p>
+
+<!--
+
+ Some overlap with other aria-labelledby tests in:
+ - /accname/name/comp_label.html (aria-labelledby / aria-label fallback, etc.)
+ - /accname/name/comp_name_from_content.html
+ - /accname/name/shadowdom/*
+
+-->
+
+<div role="group" aria-labelledby="h" class="ex" data-expectedlabel="first heading" data-testname="div group explicitly labelledby heading">
+ <h2 id="h">first heading</h2>
+ <p>text inside div group</p>
+</div>
+
+<div role="group" aria-label="self label" id="g2" aria-labelledby="g2 h2" class="ex" data-expectedlabel="self label + first heading" data-testname="div group explicitly labelledby self and heading">
+ <h2 id="h2">+ first heading</h2>
+ <p>text inside div group</p>
+</div>
+
+<nav aria-labelledby="s1 s2 s3 s4" class="ex" data-expectedlabel="verify spaces between foreach" data-testname="nav with verified spaces appended between each of IDREFS">
+ <span id="s1">verify</span><span id="s2">spaces</span><span>FAIL IF INCLUDED</span><span id="s3">between</span><span id="s4">foreach</span>
+</nav>
+
+<!--
+
+ BLOCKED on https://github.com/w3c/accname/issues/209
+
+ Once that's resolved, it may be worthwhile to add a new ./comp_labelledby_recursion.html file,
+ so that the implementation diffs rolling in don't penalize this Interop 2024 test.
+
+ All remaining cases of https://w3c.github.io/accname/#comp_labelledby
+ - comp_labelledby_reset
+ - comp_labelledby_foreach
+ - comp_labelledby_set_current
+ - comp_labelledby_recursion
+ - comp_labelledby_append
+ - comp_labelledby_return
+
+-->
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_labelledby_hidden_nodes.html b/testing/web-platform/tests/accname/name/comp_labelledby_hidden_nodes.html
new file mode 100644
index 0000000000..97a8c39220
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_labelledby_hidden_nodes.html
@@ -0,0 +1,245 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Labelledby & Hidden Nodes</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 hidden node name computation as part of the <a href="https://w3c.github.io/accname/#comp_labelledby">#comp_labelledby</a> portion of the AccName <em>Name Computation</em> algorithm.</p>
+
+<!--
+
+ These tests verify browser conformance with the following note as part of accName computation Step 2B:
+
+ "The result of LabelledBy Recursion in combination with Hidden Not Referenced means
+ that user agents MUST include all nodes in the subtree as part of
+ the accessible name or accessible description, when the node referenced
+ by aria-labelledby or aria-describedby is hidden."
+
+-->
+
+<h2>Testing with <code>display:none</code></h2>
+
+ <button aria-labelledby="a11" data-expectedlabel="foo bar" data-testname="button with aria-labelledby using display:none hidden span (with nested span)" class="ex">x</button>
+ <span id="a11" style="display: none;">
+ foo
+ <span id="a12">bar</span>
+ </span>
+
+ <button aria-labelledby="a21" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using display:none hidden span (with nested spans, depth 2)" class="ex">x</button>
+ <span id="a21" style="display: none;">
+ foo
+ <span id="a22">
+ bar
+ <span id="a23">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="a31" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without display:none (with nested display:none spans, depth 2)" class="ex">x</button>
+ <span id="a31">
+ foo
+ <span id="a32" style="display: none;">
+ bar
+ <span id="a33">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="a41" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using display:none hidden span (with nested sibling spans)" class="ex">x</button>
+ <span id="a41" style="display: none;">
+ foo
+ <span id="a42">bar</span>
+ <span id="a43">baz</span>
+ </span>
+
+ <button aria-labelledby="a51" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without display:none (with nested display:none sibling spans)" class="ex">x</button>
+ <span id="a51">
+ foo
+ <span id="a52" style="display: none;">bar</span>
+ <span id="a53" style="display: none;">baz</span>
+ </span>
+
+ <button aria-labelledby="a61" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using span with display:none (with nested display:inline sibling spans)" class="ex">x</button>
+ <span id="a61" style="display: none;">
+ foo
+ <span id="a62" style="display: inline;">bar</span>
+ <span id="a63" style="display: inline;">baz</span>
+ </span>
+
+<h2>Testing with <code>visibility:hidden</code></h2>
+
+ <button aria-labelledby="b11" data-expectedlabel="foo bar" data-testname="button with aria-labelledby using visibility:hidden span (with nested span)" class="ex">x</button>
+ <span id="b11" style="visibility: hidden;">
+ foo
+ <span id="b12">bar</span>
+ </span>
+
+ <button aria-labelledby="b21" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using visibility:hidden span (with nested spans, depth 2)" class="ex">x</button>
+ <span id="b21" style="visibility: hidden;">
+ foo
+ <span id="b22">
+ bar
+ <span id="b23">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="b31" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without visibility:hidden (with nested visibility:hidden spans, depth 2)" class="ex">x</button>
+ <span id="b31">
+ foo
+ <span id="b32" style="visibility: hidden;">
+ bar
+ <span id="b33">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="b41" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using visibility:hidden hidden span (with nested sibling spans)" class="ex">x</button>
+ <span id="b41" style="visibility: hidden;">
+ foo
+ <span id="b42">bar</span>
+ <span id="b43">baz</span>
+ </span>
+
+ <button aria-labelledby="b51" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without visibility:hidden (with nested visibility:hidden sibling spans)" class="ex">x</button>
+ <span id="b51">
+ foo
+ <span id="b52" style="visibility: hidden;">bar</span>
+ <span id="b53" style="visibility: hidden;">baz</span>
+ </span>
+
+ <button aria-labelledby="b61" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using span with visibility:hidden (with nested visibility:visible sibling spans)" class="ex">x</button>
+ <span id="b61" style="visibility: hidden;">
+ foo
+ <span id="b62" style="visibility: visible;">bar</span>
+ <span id="b63" style="visibility: visible;">baz</span>
+ </span>
+
+<h2>Testing with <code>visibility:collapse</code></h2>
+
+ <button aria-labelledby="c11" data-expectedlabel="foo bar" data-testname="button with aria-labelledby using visibility:collapse span (with nested span)" class="ex">x</button>
+ <span id="c11" style="visibility: collapse;">
+ foo
+ <span id="c12">bar</span>
+ </span>
+
+ <button aria-labelledby="c21" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using visibility:collapse span (with nested spans, depth 2)" class="ex">x</button>
+ <span id="c21" style="visibility: collapse;">
+ foo
+ <span id="c22">
+ bar
+ <span id="c23">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="c31" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using span without visibility:collapse (with nested visibility:visible spans, depth 2)" class="ex">x</button>
+ <span id="c31">
+ foo
+ <span id="c32" style="visibility: visible;">
+ bar
+ <span id="c33" style="visibility: visible;">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="c41" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using visibility:collapse span (with nested sibling spans)" class="ex">x</button>
+ <span id="c41" style="visibility: collapse;">
+ foo
+ <span id="c42">bar</span>
+ <span id="c43">baz</span>
+ </span>
+
+ <button aria-labelledby="c51" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without visibility:collapse (with nested visibility:collapse sibling spans)" class="ex">x</button>
+ <span id="c51">
+ foo
+ <span id="c52" style="visibility: collapse;">bar</span>
+ <span id="c53" style="visibility: collapse;">baz</span>
+ </span>
+
+ <button aria-labelledby="c61" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using span with visibility:collapse (with nested visible sibling spans)" class="ex">x</button>
+ <span id="c61" style="visibility: collapse;">
+ foo
+ <span id="c62" style="visibility: visible;">bar</span>
+ <span id="c63" style="visibility: visible;">baz</span>
+ </span>
+
+<h2>Testing with <code>aria-hidden</code></h2>
+
+ <button aria-labelledby="d11" data-expectedlabel="foo bar" data-testname="button with aria-labelledby using aria-hidden span (with nested span)" class="ex">x</button>
+ <span id="d11" aria-hidden="true">
+ foo
+ <span id="d12">bar</span>
+ </span>
+
+ <button aria-labelledby="d21" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using aria-hidden span (with nested spans, depth 2)" class="ex">x</button>
+ <span id="d21" aria-hidden="true">
+ foo
+ <span id="d22">
+ bar
+ <span id="d23">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="d31" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without aria-hidden (with nested aria-hidden spans, depth 2)" class="ex">x</button>
+ <span id="d31">
+ foo
+ <span id="d32" aria-hidden="true">
+ bar
+ <span id="d33">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="d41" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using aria-hidden hidden span (with nested sibling spans)" class="ex">x</button>
+ <span id="d41" aria-hidden="true">
+ foo
+ <span id="d42">bar</span>
+ <span id="d43">baz</span>
+ </span>
+
+<h2>Testing with <code>hidden</code> attribute</h2>
+
+ <button aria-labelledby="e11" data-expectedlabel="foo bar" data-testname="button with aria-labelledby using HTML5 hidden span (with nested span)" class="ex">x</button>
+ <span id="e11" hidden>
+ foo
+ <span id="e12">bar</span>
+ </span>
+
+ <button aria-labelledby="e21" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using HTML5 hidden span (with nested spans, depth 2)" class="ex">x</button>
+ <span id="e21" hidden>
+ foo
+ <span id="e22">
+ bar
+ <span id="e23">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="e31" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without HTML5 hidden (with nested HTML5 hidden spans, depth 2)" class="ex">x</button>
+ <span id="e31">
+ foo
+ <span id="e32" hidden>
+ bar
+ <span id="e33">baz</span>
+ </span>
+ </span>
+
+ <button aria-labelledby="e41" data-expectedlabel="foo bar baz" data-testname="button with aria-labelledby using HTML5 hidden span (with nested hidden sibling spans)" class="ex">x</button>
+ <span id="e41" hidden>
+ foo
+ <span id="e42">bar</span>
+ <span id="e43">baz</span>
+ </span>
+
+ <button aria-labelledby="e51" data-expectedlabel="foo" data-testname="button with aria-labelledby using span without HTML5 hidden (with nested hidden sibling spans)" class="ex">x</button>
+ <span id="e51">
+ foo
+ <span id="e52" hidden>bar</span>
+ <span id="e53" hidden>baz</span>
+ </span>
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_name_from_content.html b/testing/web-platform/tests/accname/name/comp_name_from_content.html
new file mode 100644
index 0000000000..deae6699c6
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_name_from_content.html
@@ -0,0 +1,271 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Name From Content</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>
+ <style type="text/css">
+
+ /*
+
+ Since the AccName spec is in flux about whitespace joiners, and the implementations don't match,
+ normalize the whitespace (with extra leading/trailing) space.
+
+ No point in having the same in-flux spec change cause failures the remaining unrelated tests.
+
+ See more here:
+ https://github.com/w3c/accname/issues/205
+ https://github.com/w3c/accname/projects/1#card-42288231
+
+ */
+
+ .simple-before::before {
+ content: " before "; /* [sic] leading and trailing space */
+ margin:0 0.1em;
+ }
+ .simple-after::after {
+ content: " after "; /* [sic] leading and trailing space */
+ margin:0 0.1em;
+ }
+ .no-space::before, .no-space::after {
+ content: "nospace"; /* [sic] Unlike the others, NO extra leading/trailing space here. */
+ }
+ .simple-before:dir(rtl)::before {
+ content: " من قبل "; /* [sic] leading and trailing space */
+ }
+ .simple-after:dir(rtl)::after {
+ content: " بعد "; /* [sic] leading and trailing space */
+ }
+ .fallback-before::before {
+ content: " before "; /* [sic] leading and trailing space */
+ content: " before " / " alt-before "; /* Override the previous line for engines that support the Alternative Text syntax. */
+ }
+ .fallback-after::after {
+ content: " after "; /* [sic] leading and trailing space */
+ content: " after " / " alt-after "; /* Override the previous line for engines that support the Alternative Text syntax. */
+ }
+ .fallback-before-mixed::before {
+ content: " before "; /* [sic] leading and trailing space */
+ content: " before " / " start " attr(data-alt-text-before) " end "; /* Override the previous line for engines that support the Alternative Text syntax. */
+ }
+ .fallback-after-mixed::after {
+ content: " after "; /* [sic] leading and trailing space */
+ content: " after " / " start " attr(data-alt-text-after) " end "; /* Override the previous line for engines that support the Alternative Text syntax. */
+ }
+ .block > span {
+ display: block;
+ margin: 0 0.1em;
+ }
+ .iblock > span {
+ display: inline-block;
+ margin: 0 0.1em;
+ }
+
+ </style>
+</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>
+
+<p>This series of tests exercises the button, heading, and link elements, because each have different characteristics worthy of testing in each of the name computation algorithm scenarios:</p>
+<ul>
+ <li>button is a leaf node with sub-level elements presentational.</li>
+ <li>heading is block level, and can contain sub-level interactives like links.</li>
+ <li>link (a[href]) is an interactive inline element that can include non-presentational descendants.</li>
+</ul>
+
+<h1>ARIA roles, inline</h1>
+<span tabindex="0" role="button" data-expectedlabel="label" data-testname="aria button name from content, inline" class="ex">label</span><br>
+<span tabindex="0" role="heading" data-expectedlabel="label" data-testname="aria heading name from content, inline" class="ex">label</span><br>
+<span tabindex="0" role="link" data-expectedlabel="label" data-testname="aria link name from content, inline" class="ex">label</span><br>
+<br>
+
+<h1>ARIA roles, block</h1>
+<div tabindex="0" role="button" data-expectedlabel="label" data-testname="aria button name from content, block" class="ex">label</div>
+<div tabindex="0" role="heading" data-expectedlabel="label" data-testname="aria heading name from content, block" class="ex">label</div>
+<div tabindex="0" role="link" data-expectedlabel="label" data-testname="aria link name from content, block" class="ex">label</div>
+<br>
+
+<h1>simple</h1>
+<button data-expectedlabel="label" data-testname="button name from content" class="ex">label</button><br>
+<h3 data-expectedlabel="label" data-testname="heading name from content" class="ex">label</h3>
+<a href="#" data-expectedlabel="label" data-testname="link name from content" class="ex">label</a><br>
+<br>
+
+<h1>simple with ::before</h1>
+<button data-expectedlabel="before label" data-testname="button name from content with ::before" class="ex simple-before">label</button><br>
+<h3 data-expectedlabel="before label" data-testname="heading name from content with ::before" class="ex simple-before">label</h3>
+<a href="#" data-expectedlabel="before label" data-testname="link name from content with ::before" class="ex simple-before">label</a><br>
+<br>
+
+<h1>simple with ::after</h1>
+<button data-expectedlabel="label after" data-testname="button name from content with ::after" class="ex simple-after">label</button><br>
+<h3 data-expectedlabel="label after" data-testname="heading name from content with ::after" class="ex simple-after">label</h3>
+<a href="#" data-expectedlabel="label after" data-testname="link name from content with ::after" class="ex simple-after">label</a><br>
+<br>
+
+<h1>simple with ::before and ::after</h1>
+<button data-expectedlabel="before label after" data-testname="button name from content with ::before and ::after" class="ex simple-before simple-after">label</button><br>
+<h3 data-expectedlabel="before label after" data-testname="heading name from content with ::before and ::after" class="ex simple-before simple-after">label</h3>
+<a href="#" data-expectedlabel="before label after" data-testname="link name from content with ::before and ::after" class="ex simple-before simple-after">label</a><br>
+<br>
+
+<h1>no space joiners ::before and ::after</h1>
+<button data-expectedlabel="nospacelabelnospace" data-testname="button name from content no space joiners ::before and ::after" class="ex no-space">label</button><br>
+<h3 data-expectedlabel="nospacelabelnospace" data-testname="heading name from content no space joiners ::before and ::after" class="ex no-space">label</h3>
+<a href="#" data-expectedlabel="nospacelabelnospace" data-testname="link name from content no space joiners ::before and ::after" class="ex no-space">label</a><br>
+<br>
+
+<h1>Arabic right-to-left (RTL) with ::before and ::after</h1>
+<div dir="rtl" lang="ar">
+ <button data-expectedlabel="من قبل اسم بعد" data-testname="button name from content with ::before and ::after in rtl" class="ex simple-before simple-after">اسم</button><br>
+ <h3 data-expectedlabel="من قبل اسم بعد" data-testname="heading name from content with ::before and ::after in rtl" class="ex simple-before simple-after">اسم</h3>
+ <a href="#" data-expectedlabel="من قبل اسم بعد" data-testname="link name from content with ::before and ::after in rtl" class="ex simple-before simple-after">اسم</a><br>
+</div>
+<br>
+
+<h1><a href="https://drafts.csswg.org/css-content/#alt">Alternative Text for CSS content (previously `alt:`)</a> in pseudo-elements</h1>
+<p>rendered text should be "before label after"</p>
+<p>accessibility label should be "alt-before label alt-after"</p>
+<button data-expectedlabel="alt-before label alt-after" data-testname="button name from fallback content with ::before and ::after" class="ex fallback-before fallback-after">label</button><br>
+<h3 data-expectedlabel="alt-before label alt-after" data-testname="heading name from fallback content with ::before and ::after" class="ex fallback-before fallback-after">label</h3>
+<a href="#" data-expectedlabel="alt-before label alt-after" data-testname="link name from fallback content with ::before and ::after" class="ex fallback-before fallback-after">label</a><br>
+<br>
+
+<h1><a href="https://drafts.csswg.org/css-content/#alt">Mixed Alternative Text (attr() and strings) for CSS content (previously `alt:`)</a> in pseudo-elements</h1>
+<p>rendered text should be "before label after"</p>
+<p>accessibility label should be "start alt-before end label start alt-after end"</p>
+<button data-alt-text-before="alt-before" data-alt-text-after="alt-after" data-expectedlabel="start alt-before end label start alt-after end" data-testname="button name from fallback content mixing attr() and strings with ::before and ::after" class="ex fallback-before-mixed fallback-after-mixed">label</button><br>
+<h3 data-alt-text-before="alt-before" data-alt-text-after="alt-after" data-expectedlabel="start alt-before end label start alt-after end" data-testname="heading name from fallback content mixing attr() and strings with ::before and ::after" class="ex fallback-before-mixed fallback-after-mixed">label</h3>
+<a href="#" data-alt-text-before="alt-before" data-alt-text-after="alt-after" data-expectedlabel="start alt-before end label start alt-after end" data-testname="link name from fallback content mixing attr() and strings with ::before and ::after" class="ex fallback-before-mixed fallback-after-mixed">label</a><br>
+<br>
+
+<h1>simple w/ for each child</h1>
+<button data-expectedlabel="one two three" data-testname="button name from content for each child" class="ex"><span>one</span> <span>two</span> <span>three</span></button><br>
+<h3 data-expectedlabel="one two three" data-testname="heading name from content for each child" class="ex"><span>one</span> <span>two</span> <span>three</span></h3>
+<a href="#" data-expectedlabel="one two three" data-testname="link name from content for each child" class="ex"><span>one</span> <span>two</span> <span>three</span></a><br>
+<br>
+
+<h1>simple for each child with image</h1>
+<button data-expectedlabel="one two three" data-testname="button name from content for each child including image" class="ex"><span>one</span> <img alt="two" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> <span>three</span></button><br>
+<h3 data-expectedlabel="one two three" data-testname="heading name from content for each child including image" class="ex"><span>one</span> <img alt="two" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> <span>three</span></h3>
+<a href="#" data-expectedlabel="one two three" data-testname="link name from content for each child including image" class="ex"><span>one</span> <img alt="two" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="> <span>three</span></a><br>
+<br>
+
+
+<h1>simple for each child with extra nesting containing image</h1>
+<button data-expectedlabel="one two three four" data-testname="button name from content for each child including nested image" class="ex"><span>one</span> <span>two <img alt="three" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></span> <span>four</span></button><br>
+<h3 data-expectedlabel="one two three four" data-testname="heading name from content for each child including nested image" class="ex"><span>one</span> <span>two <img alt="three" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></span> <span>four</span></h3>
+<a href="#" data-expectedlabel="one two three four" data-testname="link name from content for each child including nested image" class="ex"><span>one</span> <span>two <img alt="three" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></span> <span>four</span></a><br>
+<br>
+
+<h1>heading with nested button with nested image</h1>
+<h3 data-expectedlabel="heading button image button heading" data-testname="heading name from content for each child including nested button with nested image" class="ex">
+ heading
+ <button>
+ button
+ <img alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+ button
+ </button>
+ heading
+</h3>
+
+<h1>heading with nested link with nested image</h1>
+<h3 data-expectedlabel="heading link image link heading" data-testname="heading name from content for each child including nested link with nested image" class="ex">
+ heading
+ <a href="#">
+ link
+ <img alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+ link
+ </a>
+ heading
+</h3>
+
+<h1>heading with nested link with nested image using aria-label</h1>
+<h3 data-expectedlabel="heading link aria-label heading" data-testname="heading name from content for each child including nested link using aria-label with nested image" class="ex">
+ heading
+ <a href="#" aria-label="link aria-label"><!-- should skip the other link text -->
+ ignored link text
+ <img id="nested_image_label_1" alt="ignored image alt" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+ ignored link text
+ </a>
+ heading
+</h3>
+
+<h1>heading with nested link with nested image using aria-labelledby</h1>
+<h3 data-expectedlabel="heading image heading" data-testname="heading name from content for each child including nested link using aria-labelledby with nested image" class="ex">
+ heading
+ <a href="#" aria-labelledby="nested_image_label1"><!-- should skip the other link text -->
+ ignored link text
+ <img id="nested_image_label1" alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+ ignored link text
+ </a>
+ heading
+</h3>
+
+<h1>heading with two nested links referencing image using aria-labelledby</h1>
+<h3 data-expectedlabel="image link2 link3" data-testname="heading name from content for each child including two nested links using aria-labelledby with nested image" class="ex">
+ <a href="#" aria-labelledby="nested_image_label2">
+ link1<!-- this text is skipped because of aria-labelledby -->
+ </a>
+ <a href="#" data-expectedlabel="link2 image link3" data-testname="link name from content for each child including nested image (referenced elsewhere via labelledby)" class="ex">
+ link2
+ <img id="nested_image_label2" alt="image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+ <!-- image skipped in this link (when computing heading text) because it was already referenced by the first link within this heading label recursion cycle. -->
+ <!-- but image not skipped when computing the text of the link itself since it has not been referenced in that context -->
+ link3
+ </a>
+</h3>
+
+<!-- cross-referencial edge case-->
+<h1>heading with link referencing image using aria-labelledby, that in turn references text element via aria-labelledby</h1>
+<h3 data-expectedlabel="image link" data-testname="heading with link referencing image using aria-labelledby, that in turn references text element via aria-labelledby" class="ex">
+ <a href="#" aria-labelledby="nested_image_label3">
+ <span class="note" id="crossref_link">link</span><!-- this text is skipped the first time around because of aria-labelledby on parent element -->
+ </a>
+ <!-- but it's picked up again in inverse order b/c of cross-referencial aria-labelledby edge case -->
+ <img id="nested_image_label_3" alt="image" aria-labelledby="crossref_link" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+</h3>
+
+<!-- self-referencial edge case-->
+<h1>heading with link referencing image using aria-labelledby, that in turn references itself and another element via aria-labelledby</h1>
+<h3 data-expectedlabel="image link" data-testname="heading with link referencing image using aria-labelledby, that in turn references itself and another element via aria-labelledby" class="ex">
+ <a href="#" aria-labelledby="nested_image_label4">
+ <span class="note" id="crossref_link2">link</span><!-- this text is skipped the first time around because of aria-labelledby on parent element -->
+ </a>
+ <!-- but it's picked up again (after the self-referencial image alt) in inverse order b/c of cross-referencial aria-labelledby edge case -->
+ <img id="nested_image_label4" alt="image" aria-labelledby="nested_image_label4 crossref_link2" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+</h3>
+
+
+<!-- Note: The following test is out of line with the spec, but matching two out of three implementations at the time of writing, and spec changes are expeected. -->
+<!-- See details in https://github.com/w3c/accname/issues/205 -->
+<!-- Final spec resolution will be addressed in AccName Whitespace Project: https://github.com/w3c/accname/projects/1#card-42288231 -->
+<h1>simple w/ for each child (w/o spaces and display:inline)</h1>
+<button data-expectedlabel="onetwothree" data-testname="button name from content for each child (no space, inline)" class="ex"><span>one</span><span>two</span><span>three</span></button><br>
+<h3 data-expectedlabel="onetwothree" data-testname="heading name from content for each child (no space, inline)" class="ex"><span>one</span><span>two</span><span>three</span></h3>
+<a href="#" data-expectedlabel="onetwothree" data-testname="link name from content for each child (no space, inline)" class="ex"><span>one</span><span>two</span><span>three</span></a><br>
+<br>
+
+<h1>simple w/ for each child (w/o spaces and display:block)</h1>
+<button data-expectedlabel="one two three" data-testname="button name from content for each child (no space, display:block)" class="ex block"><span>one</span><span>two</span><span>three</span></button><br>
+<h3 data-expectedlabel="one two three" data-testname="heading name from content for each child (no space, display:block)" class="ex block"><span>one</span><span>two</span><span>three</span></h3>
+<a href="#" data-expectedlabel="one two three" data-testname="link name from content for each child (no space, display:block)" class="ex block"><span>one</span><span>two</span><span>three</span></a><br>
+<br>
+
+<h1>simple w/ for each child (w/o spaces and display:inline block)</h1>
+<button data-expectedlabel="one two three" data-testname="button name from content for each child (no space, display:inline-block)" class="ex iblock"><span>one</span><span>two</span><span>three</span></button><br>
+<h3 data-expectedlabel="one two three" data-testname="heading name from content for each child (no space, display:inline-block)" class="ex iblock"><span>one</span><span>two</span><span>three</span></h3>
+<a href="#" data-expectedlabel="one two three" data-testname="link name from content for each child (no space, display:inline-block)" class="ex iblock"><span>one</span><span>two</span><span>three</span></a><br>
+<br>
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_text_node.html b/testing/web-platform/tests/accname/name/comp_text_node.html
new file mode 100644
index 0000000000..a31f9e0245
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_text_node.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Text Node</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 <a href="https://w3c.github.io/accname/#comp_text_node">#comp_text_node</a> portions of the AccName <em>Name Computation</em> algorithm.</p>
+
+<!--
+
+ Note: some overlap with the tests in:
+ - /accname/name/comp_label.html
+ - /accname/name/comp_name_from_content.html
+
+-->
+
+<h1>text/element/text nodes, no space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="buttonlabel" data-testname="span[role=button] with text/element/text nodes, no space">button<span></span>label</span>
+<div role="heading" class="ex" data-expectedlabel="headinglabel" data-testname="div[role=heading] with text/element/text nodes, no space">heading<span></span>label</div>
+<button class="ex" data-expectedlabel="buttonlabel" data-testname="button with text/element/text nodes, no space">button<span></span>label</button>
+<h3 class="ex" data-expectedlabel="headinglabel" data-testname="heading with text/element/text nodes, no space">heading<span></span>label</h3>
+<a href="#" class="ex" data-expectedlabel="linklabel" data-testname="link with text/element/text nodes, no space">link<span></span>label</a>
+<br>
+
+<h1>text/comment/text nodes, no space</h1>
+<!-- Note: This set is not currently to spec until https://github.com/w3c/accname/issues/193 is resolved. -->
+<span role="button" tabindex="0" class="ex" data-expectedlabel="buttonlabel" data-testname="span[role=button] with text/comment/text nodes, no space">
+ button<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
+</span>
+<div role="heading" class="ex" data-expectedlabel="headinglabel" data-testname="div[role=heading] with text/comment/text nodes, no space">
+ heading<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
+</div>
+<button class="ex" data-expectedlabel="buttonlabel" data-testname="button with text/comment/text nodes, no space">
+ button<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
+</button>
+<h3 class="ex" data-expectedlabel="headinglabel" data-testname="heading with text/comment/text nodes, no space">
+ heading<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
+</h3>
+<a href="#" class="ex" data-expectedlabel="linklabel" data-testname="link with text/comment/text nodes, no space">
+ link<!-- with non-text node splitting concatenated text nodes -->label<!-- [sic] no extra spaces around first comment -->
+</a>
+<br>
+
+<h1>text/comment/text nodes, with space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button label" data-testname="span[role=button] with text/comment/text nodes, with space">
+ button
+ <!-- comment node between text nodes with leading/trailing whitespace -->
+ label
+</span>
+<div role="heading" class="ex" data-expectedlabel="heading label" data-testname="div[role=heading] with text/comment/text nodes, with space">
+ heading
+ <!-- comment node between text nodes with leading/trailing whitespace -->
+ label
+</div>
+<button class="ex" data-expectedlabel="button label" data-testname="button with text/comment/text nodes, with space">
+ button
+ <!-- comment node between text nodes with leading/trailing whitespace -->
+ label
+</button>
+<h3 class="ex" data-expectedlabel="heading label" data-testname="heading with text/comment/text nodes, with space">
+ heading
+ <!-- comment node between text nodes with leading/trailing whitespace -->
+ label
+</h3>
+<a href="#" class="ex" data-expectedlabel="link label" data-testname="link with text/comment/text nodes, with space">
+ link
+ <!-- comment node between text nodes with leading/trailing whitespace -->
+ label
+</a>
+<br>
+
+<h1>text node, with tab char</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button label" data-testname="span[role=button] with text node, with tab char">button label</span>
+<div role="heading" class="ex" data-expectedlabel="heading label" data-testname="div[role=heading] with text node, with tab char">heading label</div>
+<button class="ex" data-expectedlabel="button label" data-testname="button with text node, with tab char">button label</button>
+<h3 class="ex" data-expectedlabel="heading label" data-testname="heading with text node, with tab char">heading label</h3>
+<a href="#" class="ex" data-expectedlabel="link label" data-testname="link with text node, with tab char">link label</a>
+<br>
+
+<h1>text node, with non-breaking space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button&nbsp;label" data-testname="span[role=button] with text node, with non-breaking space">button&nbsp;label</span>
+<div role="heading" class="ex" data-expectedlabel="heading&nbsp;label" data-testname="div[role=heading] with text node, with non-breaking space">heading&nbsp;label</div>
+<button class="ex" data-expectedlabel="button&nbsp;label" data-testname="button with text node, with non-breaking space">button&nbsp;label</button>
+<h3 class="ex" data-expectedlabel="heading&nbsp;label" data-testname="heading with text node, with non-breaking space">heading&nbsp;label</h3>
+<a href="#" class="ex" data-expectedlabel="link&nbsp;label" data-testname="link with text node, with non-breaking space">link&nbsp;label</a>
+<br>
+
+<h1>text node, with extra non-breaking space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button&nbsp;&nbsp;&nbsp;label" data-testname="span[role=button] with text node, with extra non-breaking space">button&nbsp;&nbsp;&nbsp;label</span>
+<div role="heading" class="ex" data-expectedlabel="heading&nbsp;&nbsp;&nbsp;label" data-testname="div[role=heading] with text node, with extra non-breaking space">heading&nbsp;&nbsp;&nbsp;label</div>
+<button class="ex" data-expectedlabel="button&nbsp;&nbsp;&nbsp;label" data-testname="button with text node, with extra non-breaking space">button&nbsp;&nbsp;&nbsp;label</button>
+<h3 class="ex" data-expectedlabel="heading&nbsp;&nbsp;&nbsp;label" data-testname="heading with text node, with extra non-breaking space">heading&nbsp;&nbsp;&nbsp;label</h3>
+<a href="#" class="ex" data-expectedlabel="link&nbsp;&nbsp;&nbsp;label" data-testname="link with text node, with extra non-breaking space">link&nbsp;&nbsp;&nbsp;label</a>
+<br>
+
+<h1>text node, with leading/trailing non-breaking space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button&nbsp;label" data-testname="span[role=button] with text node, with leading/trailing non-breaking space">&nbsp;button&nbsp;label&nbsp;</span>
+<div role="heading" class="ex" data-expectedlabel="heading&nbsp;label" data-testname="div[role=heading] with text node, with leading/trailing non-breaking space">&nbsp;heading&nbsp;label&nbsp;</div>
+<button class="ex" data-expectedlabel="button&nbsp;label" data-testname="button with text node, with leading/trailing non-breaking space">&nbsp;button&nbsp;label&nbsp;</button>
+<h3 class="ex" data-expectedlabel="heading&nbsp;label" data-testname="heading with text node, with leading/trailing non-breaking space">&nbsp;heading&nbsp;label&nbsp;</h3>
+<a href="#" class="ex" data-expectedlabel="link&nbsp;label" data-testname="link with text node, with leading/trailing non-breaking space">&nbsp;link&nbsp;label&nbsp;</a>
+<br>
+
+<h1>text node, with mixed space and non-breaking space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button &nbsp; label" data-testname="span[role=button] with text node, with mixed space and non-breaking space">button &nbsp; label</span>
+<div role="heading" class="ex" data-expectedlabel="heading &nbsp; label" data-testname="div[role=heading] with text node, with mixed space and non-breaking space">heading &nbsp; label</div>
+<button class="ex" data-expectedlabel="button &nbsp; label" data-testname="button with text node, with mixed space and non-breaking space">button &nbsp; label</button>
+<h3 class="ex" data-expectedlabel="heading &nbsp; label" data-testname="heading with text node, with mixed space and non-breaking space">heading &nbsp; label</h3>
+<a href="#" class="ex" data-expectedlabel="link &nbsp; label" data-testname="link with text node, with mixed space and non-breaking space">link &nbsp; label</a>
+<br>
+
+<h1>text nodes, with deeply nested space</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button label" data-testname="span[role=button] with text node, with deeply nested space">
+button<span><span><span><span><span><span><span> </span></span></span></span></span></span></span>label
+</span>
+<div role="heading" class="ex" data-expectedlabel="heading label" data-testname="div[role=heading] with text node, with deeply nested space">
+heading<span><span><span><span><span><span><span> </span></span></span></span></span></span></span>label
+</div>
+<button class="ex" data-expectedlabel="button label" data-testname="button with text node, with deeply nested space">
+button<span><span><span><span><span><span><span> </span></span></span></span></span></span></span>label
+</button>
+<h3 class="ex" data-expectedlabel="heading label" data-testname="heading with text node, with deeply nested space">
+heading<span><span><span><span><span><span><span> </span></span></span></span></span></span></span>label
+</h3>
+<a href="#" class="ex" data-expectedlabel="link label" data-testname="link with text node, with deeply nested space">
+link<span><span><span><span><span><span><span> </span></span></span></span></span></span></span>label
+</a>
+<br>
+
+<h1>text nodes, with single line break</h1>
+<span role="button" tabindex="0" class="ex" data-expectedlabel="button label" data-testname="span[role=button] with text node, with single line break">button
+label</span>
+<div role="heading" class="ex" data-expectedlabel="heading label" data-testname="div[role=heading] with text node, with single line break">heading
+label</div>
+<button class="ex" data-expectedlabel="button label" data-testname="button with text node, with single line break">button
+label</button>
+<h3 class="ex" data-expectedlabel="heading label" data-testname="heading with text node, with single line break">heading
+label</h3>
+<a href="#" class="ex" data-expectedlabel="link label" data-testname="link with text node, with single line break">link
+label</a>
+<br>
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/comp_tooltip.html b/testing/web-platform/tests/accname/name/comp_tooltip.html
new file mode 100644
index 0000000000..deaabefd93
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/comp_tooltip.html
@@ -0,0 +1,69 @@
+<!doctype html>
+<html>
+<head>
+ <title>Name Comp: Tooltip</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 <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="title" data-expectedlabel="title" data-testname="link with img with tooltip label" class="ex"><img alt="" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="></a>
+<a href="#" title="title" data-expectedlabel="title" data-testname="link with text with tooltip label and no contents" class="ex"></a>
+<a href="#" title="title" data-expectedlabel="contents" data-testname="link with text with tooltip label and contents" class="ex">contents</a>
+<div title="title" role="group" data-expectedlabel="title" data-testname="div with text with tooltip label" class="ex">contents</div><!-- Note: group role disallows nameFrom:contents -->
+<img title="title" data-expectedlabel="title" data-testname="img with tooltip label without alt" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+<img title="title" data-expectedlabel="title" alt="" data-testname="img with tooltip label with empty alt" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+<img title="title" data-expectedlabel="alt" alt="alt" data-testname="img with tooltip label with alt" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+<img data-expectedlabel="alt" alt="alt" data-testname="img with tooltip label without title" class="ex" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==">
+
+<select title="title" data-expectedlabel="title" data-testname="select with tooltip label" class="ex">
+ <option value="" disabled selected>select options</option>
+ <option value="1">option 1</option>
+ <option value="2">option 2</option>
+ <option value="3">option 3</option>
+</select>
+
+
+<!-- TODO: Move these: https://github.com/web-platform-tests/interop-accessibility/issues/78 -->
+<button title="title" data-expectedlabel="contents" data-testname="button with tooltip label" class="ex">contents</button>
+<input type="checkbox" title="title" data-expectedlabel="title" data-testname="checkbox input with tooltip label" class="ex">
+<input type="radio" title="title" data-expectedlabel="title" data-testname="radio input with tooltip label" class="ex">
+
+<!-- TODO: Move these: https://github.com/web-platform-tests/interop-accessibility/issues/78 -->
+<!-- https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-number-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-name-computation -->
+<input type="text" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="text input with placeholder and tooltip label" class="ex">
+<input type="password" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="password input with placeholder and tooltip label" class="ex">
+<input type="number" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="number input with placeholder and tooltip label" class="ex">
+<input type="search" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="search input with placeholder and tooltip label" class="ex">
+<input type="tel" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="tel input with placeholder and tooltip label" class="ex">
+<input type="email" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="email input with placeholder and tooltip label" class="ex">
+<input type="url" title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="url input with placeholder and tooltip label" class="ex">
+<textarea title="title" data-expectedlabel="title" placeholder="placeholder" data-testname="textarea with placeholder and tooltip label" class="ex"></textarea>
+
+<!-- TODO: Move these: https://github.com/web-platform-tests/interop-accessibility/issues/78 -->
+<!-- https://w3c.github.io/html-aam/#text-level-element-accessible-name-computation -->
+<abbr title="Web Platform Tests" data-expectedlabel="Web Platform Tests" data-testname="abbr with tooltip label" class="ex">WPT</abbr>
+<kbd title="Control + Option" data-expectedlabel="Control + Option" data-testname="kbd with tooltip label" class="ex">CTRL + OPT</kbd>
+
+<!-- TODO: Move these: https://github.com/web-platform-tests/interop-accessibility/issues/78 -->
+<!-- https://w3c.github.io/html-aam/#summary-element-accessible-name-computation -->
+<details>
+ <summary title="title" data-expectedlabel="contents" data-testname="summary with tooltip label and contents" class="ex">contents</summary>
+ details
+</details>
+
+<!-- TODO: Move these: https://github.com/web-platform-tests/interop-accessibility/issues/78 -->
+<!-- https://w3c.github.io/html-aam/#iframe-element-accessible-name-computation -->
+<iframe title="title" data-expectedlabel="title" data-testname="iframe with tooltip label" width="20px" height="20px" class="ex"></iframe>
+
+<script>
+AriaUtils.verifyLabelsBySelector(".ex");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/accname/name/shadowdom/basic.html b/testing/web-platform/tests/accname/name/shadowdom/basic.html
new file mode 100644
index 0000000000..9746f2db47
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/shadowdom/basic.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<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>
+
+ <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>
+<button id="labelled1"
+ class="labelled"
+ type="button"
+ aria-labelledby="label1"
+ data-expectedlabel="foo"
+ data-testname="aria-labelledby reference to element with text content inside shadow DOM"></button>
+
+<label id="label2">
+ <div id="host2"></div>
+</label>
+<button id="labelled2"
+ class="labelled"
+ type="button"
+ aria-labelledby="label2"
+ data-expectedlabel="bar"
+ data-testname="aria-labelledby reference to element with aria-label inside shadow DOM"></button>
+<script>
+
+document.getElementById('host1').attachShadow({ mode: 'open' }).innerHTML = 'foo';
+document.getElementById('host2').attachShadow({ mode: 'open' }).innerHTML = '<div aria-label="bar"></div>';
+
+AriaUtils.verifyLabelsBySelector('.labelled');
+
+</script>
diff --git a/testing/web-platform/tests/accname/name/shadowdom/slot.html b/testing/web-platform/tests/accname/name/shadowdom/slot.html
new file mode 100644
index 0000000000..41ccd5a57f
--- /dev/null
+++ b/testing/web-platform/tests/accname/name/shadowdom/slot.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<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>
+
+ <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>
+<button id="labelled1"
+ class="labelled"
+ type="button"
+ aria-labelledby="label1"
+ data-expectedlabel="foo slotted bar"
+ data-testname="aria-labelledby reference to element with slotted text content"></button>
+
+<label id="label2">
+ <div id="host2"></div>
+</label>
+<button id="labelled2"
+ class="labelled"
+ type="button"
+ aria-labelledby="label2"
+ data-expectedlabel="foo default bar"
+ data-testname="aria-labelledby reference to element with default slotted text content"></button>
+
+<label id="label3">
+ <div id="host3">slotted</div>
+</label>
+<button id="labelled3"
+ class="labelled"
+ type="button"
+ aria-labelledby="label3"
+ data-expectedlabel="foo slotted bar"
+ data-testname="aria-labelledby reference to element with slotted text content and aria-label on slot"></button>
+
+<label id="label4">
+ <div id="host4"></div>
+</label>
+<button id="labelled4"
+ class="labelled"
+ type="button"
+ aria-labelledby="label4"
+ data-expectedlabel="foo default bar"
+ data-testname="aria-labelledby reference to element with default slotted text content and aria-label on slot"></button>
+
+<script>
+
+document.getElementById('host1').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot></slot> bar';
+document.getElementById('host2').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot>default</slot> bar';
+document.getElementById('host3').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot aria-label="label"></slot> bar';
+document.getElementById('host4').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot aria-label="label">default</slot> bar';
+
+AriaUtils.verifyLabelsBySelector('.labelled');
+
+</script>