summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/interaction/focus/processing-model/legend-focusable.html
blob: c9209d3cf62d467ad1eb7a13c51fa45d55c19fb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<title>legend focusable</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
 const t = async_test();
</script>
<fieldset>
 <legend tabindex=0 onfocus="t.step(() => { t.done(); })">
  legend
  <input onfocus="t.unreached_func('input in legend was focused')();">
 </legend>
 <input onfocus="t.unreached_func('input after legend was focused')();">
</fieldset>
<script>
  document.querySelector('legend').focus();
</script>