<!-- For all controls with a visible label (e.g., link text, button text, programmatically linked label, images in links with text), check that:
The accessible name is the same as the visible label.
The accessible name contains a match for the string of the visible label.
If checks #1 and #2 are false, the content fails the Success Criterion.
-->
<p>Example 1</p>
<button id="siteSearch">Go</button>
<hr />
<p>Example 2</p>
<a href="#">Download gizmo specification</a>
<hr />
<p>Example 3</p>
<div id="hidden-label">Find in this site</div>
<input type="submit" value="Find in this site">
* {
box-sizing: border-box;
font-size: 1.2rem;
line-height: 1.5;
margin: 0;
padding: 0;
}
button {
border: 2px solid black;
margin: 1rem;
width: 100px;
}
a {
background-color: #000;
color: #fff;
display: inline;
font-family: "Open Sans", Helvetica, Trebuchet, sans-serif;
font-size: 1rem;
margin: 1rem;
padding: 0.25rem;
text-decoration-color: #f3cd2a;
text-decoration-thickness: 0.125em;
text-underline-offset: 1.5px;
text-decoration-skip-ink: auto;
width: 300px;
}
span {
font-size: 1rem;
}
div,
p {
font-family: "Open Sans", Helvetica, Trebuchet, sans-serif;
font-size: 1rem;
font-weight: 900;
margin: 1rem 1rem 1rem;
}
input {
background-color: #000;
border: none;
color: #fff;
font-family: "Open Sans", Helvetica, Trebuchet, sans-serif;
font-size: 1rem;
margin: 1rem;
padding: 0.25rem;
width: 200px;
}
#hidden-label,
.accessibly-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
hr {
margin: 2rem 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.