Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (62 sloc) 1.79 KB
<!DOCTYPE html>
<meta charset="utf-8">
<title>Native keyboard accessibility</title>
input {
margin-bottom: 10px;
button {
margin-right: 10px;
a:hover, input:hover, button:hover, select:hover,
a:focus, input:focus, button:focus, select:focus {
font-weight: bold;
<p>This is a link to <a href="">Mozilla</a>.</p>
<p>Another link, to the <a href="">Mozilla Developer Network</a>.</p>
<button data-message="This is from the first button">Click me!</button>
<button data-message="This is from the second button">Click me too!</button>
<button data-message="This is from the third button">And me!</button>
<label for="name">Fill in your name:</label>
<input type="text" id="name" name="name">
<label for="age">Enter your age:</label>
<input type="text" id="age" name="age">
<label for="mood">Choose your mood:</label>
<select id="mood" name="mood">
var buttons = document.querySelectorAll('button');
for(var i = 0; i < buttons.length; i++) {
function addHandler(button) {
button.addEventListener('click', function(e) {
var message ='data-message');
You can’t perform that action at this time.