Skip to content

Commit fcf5f39

Browse files
authored
Merge pull request #3507 from nyu-ossd-s18/improve-accessibility
Fixes to improve web accessibility
2 parents 8034d71 + 93125c7 commit fcf5f39

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

notebook/static/auth/js/loginmain.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
define(['jquery', 'base/js/namespace', 'base/js/page'], function($, IPython, page) {
55
function login_main() {
66
var page_instance = new page.Page('div#header', 'div#site');
7-
$('button#login_submit').addClass("btn btn-default");
87
page_instance.show();
98
$('input#password_input').focus();
10-
119
IPython.page = page_instance;
1210
}
1311
return login_main;

notebook/templates/login.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
<div class="navbar-inner">
2121
<div class="container">
2222
<div class="center-nav">
23-
{% if token_available %}
24-
<p class="navbar-text nav">{% trans %}Password or token:{% endtrans %}</p>
25-
{% else %}
26-
<p class="navbar-text nav">{% trans %}Password:{% endtrans %}</p>
27-
{% endif %}
2823
<form action="{{base_url}}login?next={{next}}" method="post" class="navbar-form pull-left">
2924
{{ xsrf_form_html() | safe }}
25+
{% if token_available %}
26+
<label for="password_input"><strong>{% trans %}Password or token:{% endtrans %}</strong></label>
27+
{% else %}
28+
<label for="password_input"><strong>{% trans %}Password:{% endtrans %}</strong></label>
29+
{% endif %}
3030
<input type="password" name="password" id="password_input" class="form-control">
31-
<button type="submit" id="login_submit">{% trans %}Log in{% endtrans %}</button>
31+
<button type="submit" class="btn btn-default" id="login_submit">{% trans %}Log in{% endtrans %}</button>
3232
</form>
3333
</div>
3434
</div>
@@ -92,14 +92,15 @@ <h3>{% trans %}Setup a Password{% endtrans %}</h3>
9292
<form action="{{base_url}}login?next={{next}}" method="post" class="">
9393
{{ xsrf_form_html() | safe }}
9494
<div class="form-group">
95-
<input type="password" name="password" id="password_input" class="form-control" placeholder="Token">
95+
<label for="token_input"><h4>Token</h4></label>
96+
<input type="password" name="password" id="token_input" class="form-control">
9697
</div>
9798
<div class="form-group">
98-
<input type="password" name="new_password" id="new_password_input"
99-
class="form-control" placeholder="New password" required>
99+
<label for="new_password_input"><h4>New Password</h4></label>
100+
<input type="password" name="new_password" id="new_password_input" class="form-control" required>
100101
</div>
101102
<div class="form-group">
102-
<button type="submit" id="login_submit">{% trans %}Log in and set new password{% endtrans %}</button>
103+
<button type="submit" class="btn btn-default" id="login_new_pass_submit">{% trans %}Log in and set new password{% endtrans %}</button>
103104
</div>
104105
</form>
105106
{% endif %}

notebook/templates/page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
})
100100

101101
document.nbjs_translations = {{ nbjs_translations|safe }};
102+
document.documentElement.lang = navigator.language.toLowerCase();
102103
</script>
103104

104105
{% block meta %}

0 commit comments

Comments
 (0)