Commit 2334c7f5 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '23279-tabbing-over-the-login-screen-should-go-from-password-to-submit' into 'master'

Improve tabbing usability for sign in page

## What does this MR do?
Rearranged the html elements so that the `sign in` button gets tabbed first before the other elements and used CSS to rearrange the visual layout.

I did not use `tabindex` because it does not play well with screen readers and is not recommended from an accessibility standpoint.

## Are there points in the code the reviewer needs to double check?

*  Need to make sure that there aren't any side effects to my code change. `.new_user` seemed to be automatically added through `form_for()` and I'm not sure if there will be other cases where `.new_user` is used where there is no sign in page with forget your password.

## Why was this MR needed?
Improves the tabbing order

## Screenshots (if relevant)
None

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #23279

See merge request !6867
parents ecd7e99a 8751491b
...@@ -4,6 +4,7 @@ v 8.13.0 (unreleased) ...@@ -4,6 +4,7 @@ v 8.13.0 (unreleased)
- Improve Merge When Build Succeeds triggers and execute on pipeline success. (!6675) - Improve Merge When Build Succeeds triggers and execute on pipeline success. (!6675)
- Respond with 404 Not Found for non-existent tags (Linus Thiel) - Respond with 404 Not Found for non-existent tags (Linus Thiel)
- Truncate long labels with ellipsis in labels page - Truncate long labels with ellipsis in labels page
- Improve tabbing usability for sign in page (ClemMakesApps)
- Adding members no longer silently fails when there is extra whitespace - Adding members no longer silently fails when there is extra whitespace
- Update runner version only when updating contacted_at - Update runner version only when updating contacted_at
- Add link from system note to compare with previous version - Add link from system note to compare with previous version
......
...@@ -48,6 +48,16 @@ ...@@ -48,6 +48,16 @@
margin: 0 0 10px; margin: 0 0 10px;
} }
.new_user {
position: relative;
padding-bottom: 35px;
}
.sign-in {
position: absolute;
bottom: 0;
}
.login-footer { .login-footer {
margin-top: 10px; margin-top: 10px;
......
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
= f.text_field :login, class: "form-control top", placeholder: "Username or Email", autofocus: "autofocus", autocapitalize: "off", autocorrect: "off" = f.text_field :login, class: "form-control top", placeholder: "Username or Email", autofocus: "autofocus", autocapitalize: "off", autocorrect: "off"
= f.password_field :password, class: "form-control bottom", placeholder: "Password" = f.password_field :password, class: "form-control bottom", placeholder: "Password"
.sign-in
= f.submit "Sign in", class: "btn btn-save"
- if devise_mapping.rememberable? - if devise_mapping.rememberable?
.remember-me.checkbox .remember-me.checkbox
%label{for: "user_remember_me"} %label{for: "user_remember_me"}
...@@ -8,5 +10,3 @@ ...@@ -8,5 +10,3 @@
%span Remember me %span Remember me
.pull-right .pull-right
= link_to "Forgot your password?", new_password_path(resource_name) = link_to "Forgot your password?", new_password_path(resource_name)
%div
= f.submit "Sign in", class: "btn btn-save"
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