W3: F37: Failure of Success Criterion 3.2.2 due to launching a new window without prior warning when the selection of a radio button, check box or select list is changed
This code example is taken from the Failures for WCAG 2.0
Example Begin
…
Example End
Code for this Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/JavaScript"> | |
function goToMirror(theInput) { | |
var mirrorSite = "http://download." + theInput.value + "/"; | |
window.open(mirrorSite); | |
} | |
</script> | |
… | |
<form name="mirror_form" id="mirror_form" action="" method="get"> | |
<p>Please select a mirror download site:</p> | |
<p> | |
<input type="radio" onclick="goToMirror(this);" name="mirror" | |
id="mirror_belnet" value="belnet.be" /> | |
<label for="mirror_belnet">belnet (<abbr>BE</abbr>)</label><br /> | |
<input type="radio" onclick="goToMirror(this);" name="mirror" | |
id="mirror_surfnet" value="surfnet.nl" /> | |
<label for="mirror_surfnet">surfnet (<abbr>NL</abbr>)</label><br /> | |
<input type="radio" onclick="goToMirror(this);" name="mirror" | |
id="mirror_puzzle" value="puzzle.ch" /> | |
<label for="mirror_puzzle">puzzle (<abbr>CH</abbr>)</label><br /> | |
<input type="radio" onclick="goToMirror(this);" name="mirror" | |
id="mirror_voxel" value="voxel.com" /> | |
<label for="mirror_voxel">voxel (<abbr>US</abbr>)</label><br /> | |
</p> | |
</form> |