
Who does this apply to?
Do we care?
<span onclick="">... ⇒ <a href="">... <div onclick="">... ⇒ <button onclick="">...
<img src="chart.png" alt="(description)"> <label for="firstname">First name:<label> <input type="text" id="firstname"/>
tabindex:
<!-- Natural tab order --> <div onclick="" tabindex="0">Clicky 1</div> <!-- Custom tab order --> <div onclick="" tabindex="7">Clicky 2</div> <!-- Focusable but not in tab order --> <div onclick="" tabindex="-1">Clicky 3</div>
element.focus()
to create an effcient workflow.Custom controls should respond to keys like Enter, Space, Arrows, Escape, etc. as appropriate
<div id="reply_icon" tabindex="0" onclick="reply()" onkeydown="return onReplyKeydown(event)">Reply</div> <script> function onReplyKeydown(event) { if (event.keyCode == 32 || event.keyCode == 13) // Space / Enter reply(); } </script>
role
attribute to indicate that a generic tag is playing the role of a standard widget, like a button:<div tabindex="0" role="button">Send</div>
<div tabindex="0" role="checkbox" aria-checked="true"> Include attachments </div>
<p> Click on this button: </p> <div class="custombutton" onclick="alert('sent!')"> Send </div>
<script> function toggle() { var b = $('#tb'); if (b.hasClass('toggled')) { b.removeClass('toggled'); } else { b.addClass('toggled'); } } </script> <div id="tb" class="togglebutton" onclick="toggle()"> Toggle </div>
<p> Click to begin calculation: </p> <button onclick="calculate()"> Calculate </button> <div id="status"> Status goes here. </div>
<p> Rate from 1 to 5 stars: </p> <div id="stars" class="star_rating"> <span class="star_cancel"></span> <span class="star_full"></span> <span class="star_full"></span> <span class="star_full"></span> <span class="star_empty"></span> <span class="star_empty"></span> <span class="star_caption"> 3 stars </span> </div>
<script> function confirm() { $('#modal_dialog').css('display', 'block'); } </script> <button onclick="confirm()"> Finish Brown Bag </button> <div id="modal_dialog" class="dialog"> <p>Are you sure you don't want to hear more?</p> <button id="ok">End it</button> <button id="cancel">Cancel</button> </div>
Wave
A special thank you to: Curtis Wilcox, Ashley Cwikla, Michael Hilborn, Artie Barrett, and Shannon Rice