Skip to content
Snippets Groups Projects
Commit fa8f27e1 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

Merge pull request #2348 from mozilla/issue_2345_idp_keyboard

Make the example IdP more keyboard accessible.
parents 7ada2225 5a7e69b6
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ BrowserID Example Primary ...@@ -14,7 +14,7 @@ BrowserID Example Primary
body { margin: auto; font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif; } body { margin: auto; font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif; }
.title { font-size: 2em; font-weight: bold; text-align: center; margin: 1.5em; } .title { font-size: 2em; font-weight: bold; text-align: center; margin: 1.5em; }
.intro { font-size: 1.2em; width: 600px; margin: auto; } .intro { font-size: 1.2em; width: 600px; margin: auto; }
.main { text-align: center; margin-top: 2em; font-size: 1.2em; width: 500px; margin: auto; display: none; } .main { text-align: center; margin-top: 2em; font-size: 1.2em; width: 500px; margin: auto; }
#whoareyou { font-weight: bold; } #whoareyou { font-weight: bold; }
</style> </style>
...@@ -32,11 +32,11 @@ body { margin: auto; font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSan ...@@ -32,11 +32,11 @@ body { margin: auto; font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSan
You are logged in as <span id="whoareyou"></span>. <a id="logout" href="#">logout</a>. You are logged in as <span id="whoareyou"></span>. <a id="logout" href="#">logout</a>.
</div> </div>
<div class="main" id="logged_out"> <form class="main" id="logged_out">
You are not logged in. Who would you like to be? You are not logged in. Who would you like to be?
<input type="text"> <input type="text" autofocus>
<button>doit</button> <button>doit</button>
</div> </form>
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript"> <script type="text/javascript">
...@@ -53,7 +53,8 @@ $(document).ready(function() { ...@@ -53,7 +53,8 @@ $(document).ready(function() {
} }
}); });
} }
$("button").click(function(e) { $("form").submit(function(e) {
e.preventDefault();
$.get('/api/login', { user: $.trim($("input").val()) }) $.get('/api/login', { user: $.trim($("input").val()) })
.success(function(r) { .success(function(r) {
updateWhoIAm(); updateWhoIAm();
......
...@@ -28,7 +28,7 @@ button { line-height: 20px; } ...@@ -28,7 +28,7 @@ button { line-height: 20px; }
<div class="main" id="logged_out"> <div class="main" id="logged_out">
Sign in as <span id="who">...</span> Sign in as <span id="who">...</span>
<button>doit</button> <button autofocus>doit</button>
<a href="#" id="cancel">cancel</a> <a href="#" id="cancel">cancel</a>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment