summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/interactive-elements/commands/legend/label-sibling-manual.html
blob: 8a7b20565f77e3e55600b698ef0780d762fa7ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<title>Label sibling</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=../common/accesskey.js></script>
<p>Press the access key combination for "a". <kbd></kbd></p>
<input id=x onfocus="fail('input associated with the label was focused')">
<fieldset>
 <legend accesskey=a>legend</legend>
 <label for=x onclick="fail('label received a click event')">label</label>
</fieldset>
<script>
 onkeyup = e => {
   if (e.keyCode === 65) {
     pass();
   }
 }
</script>