Skip to content

Commit

Permalink
Example: add links before and after the tri-state checkbox for use in…
Browse files Browse the repository at this point in the history
… setup scripts

The links are implemented with an `href` attribute which references their own ID.  This pattern creates links which are valid (according to the W3C's validator) but don't move the keyboard focus if accidentally activated by a tester.
  • Loading branch information
jscholes committed Nov 10, 2020
1 parent e47c32a commit 4357a2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/checkbox-tri-state/reference/checkbox-tri-state.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ <h1>Checkbox Example (Mixed-State)</h1>
</p>
<section>
<div class="example-header">
<h2 id="ex_label">Example</h2>
<h2 id="ex_label" tabindex="-1">Example</h2>
</div>
<div role="separator" id="ex_start_sep" aria-labelledby="ex_start_sep ex_label" aria-label="Start of"></div>
<a id="beforelink" href="#beforelink">Navigate forwards from here</a>
<div id="ex1">
<fieldset>
<legend>Sandwich Condiments</legend>
Expand All @@ -42,6 +43,7 @@ <h2 id="ex_label">Example</h2>
>
All condiments
</div>
<a id="afterlink" href="#afterlink">Navigate backwards from here</a>
<ul class="checkboxes">
<li><label><input type="checkbox" id="cond1">Lettuce</label></li>
<li><label><input type="checkbox" id="cond2" checked>Tomato</label></li>
Expand Down

0 comments on commit 4357a2e

Please sign in to comment.