Last active
September 1, 2016 16:24
-
-
Save aarongustafson/bae52e8d6f990249008c0c53a2affc0c to your computer and use it in GitHub Desktop.
Code samples from Building in 10k: Markup for Accessibility, Clarity, and Affordance
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n" | |
required aria-required="true" | |
autocorrect="off" autocapitalize="words" | |
placeholder="Sir Tim Berners Lee" | |
autocomplete="name" | |
> |
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n" | |
required aria-required="true" | |
autocorrect="off" autocapitalize="words" | |
> |
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
<label for="e">What’s the best email address to reach you at?</label> | |
<input type="email" id="e" name="e"> |
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
<div class="errors" role="alert" tabindex="0"> | |
<p>Hmm, there seems to be an error with your submission.</p> | |
<ol> | |
<li>We need <a href="#n">your name</a></li> | |
</ol> | |
</div> |
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
<header> | |
… Banner content goes here … | |
</header> |
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
<!DOCTYPE html> | |
<html id="akapart" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>10k Apart</title> | |
</head> | |
<body> | |
… My content went here … | |
</body> | |
</html> |
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n" | |
required aria-required="true" | |
autocorrect="off" autocapitalize="words" | |
placeholder="Sir Tim Berners Lee" | |
autocomplete="name" | |
value="" | |
aria-invalid="true" | |
aria-describedby="e-n" | |
> | |
<strong id="e-n">You want to get credit for your project right? Please provide your name.</strong> |
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
<main> | |
… Primary content goes here … | |
</main> |
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n"> |
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n" | |
required aria-required="true" | |
autocorrect="off" autocapitalize="words" | |
placeholder="Sir Tim Berners Lee" | |
> |
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
<label for="n">What’s your name?</label> | |
<input id="n" name="n" | |
required aria-required="true" | |
> |
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
<header> | |
… Banner content goes here … | |
<nav aria-label="Main Navigation"> | |
… Navigation goes here … | |
</nav> | |
</header> | |
<main> | |
… Primary content goes here … | |
</main> | |
<footer> | |
… Copyright, etc. goes here … | |
</footer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment