Commit e145d7f8 by Braden MacDonald

Merge pull request #8699 from open-craft/sso-a11y

Improve screen reader user experience on logistration page
parents a9c67c56 49d200c7
...@@ -93,7 +93,7 @@ var edx = edx || {}; ...@@ -93,7 +93,7 @@ var edx = edx || {};
}, },
thirdPartyAuth: function( event ) { thirdPartyAuth: function( event ) {
var providerUrl = $(event.target).data('provider-url') || ''; var providerUrl = $(event.currentTarget).data('provider-url') || '';
if (providerUrl) { if (providerUrl) {
window.location.href = providerUrl; window.location.href = providerUrl;
......
...@@ -62,7 +62,7 @@ var edx = edx || {}; ...@@ -62,7 +62,7 @@ var edx = edx || {};
}, },
thirdPartyAuth: function( event ) { thirdPartyAuth: function( event ) {
var providerUrl = $(event.target).data('provider-url') || ''; var providerUrl = $(event.currentTarget).data('provider-url') || '';
if ( providerUrl ) { if ( providerUrl ) {
window.location.href = providerUrl; window.location.href = providerUrl;
......
...@@ -385,6 +385,10 @@ $sm-btn-linkedin: #0077b5; ...@@ -385,6 +385,10 @@ $sm-btn-linkedin: #0077b5;
color: $white; color: $white;
} }
span {
color: inherit;
}
&:hover, &:hover,
&:focus { &:focus {
background-image: none; background-image: none;
......
...@@ -35,6 +35,15 @@ ...@@ -35,6 +35,15 @@
</h2> </h2>
</div> </div>
<p class="sr">
<% if ( context.providers.length > 0 && !context.currentProvider || context.hasSecondaryProviders ) { %>
<%- gettext("Sign in here using your email address and password, or use one of the providers listed below.") %>
<% } else { %>
<%- gettext("Sign in here using your email address and password.") %>
<% } %>
<%- gettext("If you do not yet have an account, use the button below to register.") %>
</p>
<%= context.fields %> <%= context.fields %>
<button type="submit" class="action action-primary action-update js-login login-button"><%- gettext("Sign in") %></button> <button type="submit" class="action action-primary action-update js-login login-button"><%- gettext("Sign in") %></button>
...@@ -51,7 +60,8 @@ ...@@ -51,7 +60,8 @@
if ( provider.loginUrl ) { %> if ( provider.loginUrl ) { %>
<button type="button" class="button button-primary button-<%- provider.id %> login-provider login-<%- provider.id %>" data-provider-url="<%- provider.loginUrl %>"> <button type="button" class="button button-primary button-<%- provider.id %> login-provider login-<%- provider.id %>" data-provider-url="<%- provider.loginUrl %>">
<div class="icon fa <%- provider.iconClass %>" aria-hidden="true"></div> <div class="icon fa <%- provider.iconClass %>" aria-hidden="true"></div>
<%- provider.name %> <span aria-hidden="true"><%- provider.name %></span>
<span class="sr"><%- _.sprintf( gettext("Sign in with %(providerName)s"), {providerName: provider.name} ) %></span>
</button> </button>
<% } <% }
}); %> }); %>
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
if ( provider.registerUrl ) { %> if ( provider.registerUrl ) { %>
<button type="button" class="button button-primary button-<%- provider.id %> login-provider register-<%- provider.id %>" data-provider-url="<%- provider.registerUrl %>"> <button type="button" class="button button-primary button-<%- provider.id %> login-provider register-<%- provider.id %>" data-provider-url="<%- provider.registerUrl %>">
<span class="icon fa <%- provider.iconClass %>" aria-hidden="true"></span> <span class="icon fa <%- provider.iconClass %>" aria-hidden="true"></span>
<%- provider.name %> <span aria-hidden="true"><%- provider.name %></span>
<span class="sr"><%- _.sprintf( gettext("Create account using %(providerName)s."), {providerName: provider.name} ) %></span>
</button> </button>
<% } <% }
}); %> }); %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment