From 88993e984cb2fef1a59e59fb51336aeb75728d67 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:02:00 -0500 Subject: [PATCH 01/17] Add accessibility tests to IAL2 steps --- spec/features/accessibility/idv_pages_spec.rb | 23 ++++++++++ spec/support/features/doc_auth_helper.rb | 45 ++++++++++++------- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/spec/features/accessibility/idv_pages_spec.rb b/spec/features/accessibility/idv_pages_spec.rb index 1f1fd2c475a..dab67d0261a 100644 --- a/spec/features/accessibility/idv_pages_spec.rb +++ b/spec/features/accessibility/idv_pages_spec.rb @@ -46,6 +46,29 @@ visit idv_path complete_all_doc_auth_steps click_idv_continue + fill_in :user_password, with: Features::SessionHelper::VALID_PASSWORD + click_continue + + expect(current_path).to eq idv_confirmations_path + expect(page).to be_accessible.according_to :section508, :"best-practice" + end + + scenario 'doc auth steps accessibility' do + sign_in_and_2fa_user + visit idv_path + complete_all_doc_auth_steps(expect_accessible: true) + click_idv_continue + fill_in :user_password, with: Features::SessionHelper::VALID_PASSWORD + click_continue + + expect(current_path).to eq idv_confirmations_path + expect(page).to be_accessible.according_to :section508, :"best-practice" + end + + scenario 'doc auth steps accessibility on mobile', driver: :headless_chrome_mobile do + sign_in_and_2fa_user + visit idv_path + complete_all_doc_auth_steps(expect_accessible: true) click_idv_continue fill_in :user_password, with: Features::SessionHelper::VALID_PASSWORD click_continue diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index 7d0e40c8d6d..85dcac4f68f 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -82,23 +82,27 @@ def idv_doc_auth_email_sent_step idv_doc_auth_step_path(step: :email_sent) end - def complete_doc_auth_steps_before_welcome_step + def complete_doc_auth_steps_before_welcome_step(expect_accessible: false) visit idv_doc_auth_welcome_step unless current_path == idv_doc_auth_welcome_step + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible end - def complete_doc_auth_steps_before_upload_step + def complete_doc_auth_steps_before_upload_step(expect_accessible: false) visit idv_doc_auth_welcome_step unless current_path == idv_doc_auth_welcome_step + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible find('label', text: t('doc_auth.instructions.consent')).click click_on t('doc_auth.buttons.continue') end - def complete_doc_auth_steps_before_document_capture_step - complete_doc_auth_steps_before_upload_step + def complete_doc_auth_steps_before_document_capture_step(expect_accessible: false) + complete_doc_auth_steps_before_upload_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_on t('doc_auth.info.upload_computer_link') end - def complete_doc_auth_steps_before_front_image_step - complete_doc_auth_steps_before_upload_step + def complete_doc_auth_steps_before_front_image_step(expect_accessible: false) + complete_doc_auth_steps_before_upload_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_on t('doc_auth.info.upload_computer_link') end @@ -113,14 +117,16 @@ def mobile_device AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1') end - def complete_doc_auth_steps_before_ssn_step - complete_doc_auth_steps_before_back_image_step + def complete_doc_auth_steps_before_ssn_step(expect_accessible: false) + complete_doc_auth_steps_before_back_image_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible attach_image click_idv_continue end - def complete_doc_auth_steps_before_back_image_step - complete_doc_auth_steps_before_front_image_step + def complete_doc_auth_steps_before_back_image_step(expect_accessible: false) + complete_doc_auth_steps_before_front_image_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible attach_image click_idv_continue end @@ -131,26 +137,31 @@ def complete_doc_auth_steps_before_mobile_back_image_step click_idv_continue end - def complete_doc_auth_steps_before_doc_success_step - complete_doc_auth_steps_before_verify_step + def complete_doc_auth_steps_before_doc_success_step(expect_accessible: false) + complete_doc_auth_steps_before_verify_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_idv_continue end - def complete_all_doc_auth_steps - complete_doc_auth_steps_before_doc_success_step + def complete_all_doc_auth_steps(expect_accessible: false) + complete_doc_auth_steps_before_doc_success_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_idv_continue end - def complete_doc_auth_steps_before_address_step + def complete_doc_auth_steps_before_address_step(expect_accessible: false) complete_doc_auth_steps_before_verify_step + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible click_link t('doc_auth.buttons.change_address') end - def complete_doc_auth_steps_before_verify_step - complete_doc_auth_steps_before_ssn_step + def complete_doc_auth_steps_before_verify_step(expect_accessible: false) + complete_doc_auth_steps_before_ssn_step(expect_accessible: expect_accessible) + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible if page.current_path == idv_doc_auth_selfie_step attach_image click_idv_continue + expect(page).to be_accessible.according_to :section508, :"best-practice" if expect_accessible end fill_out_ssn_form_ok click_idv_continue From 3b54d9069f0bff81a8f2df08600a3765c80ef46c Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:04:05 -0500 Subject: [PATCH 02/17] Add accessbility specs to device events, cancel registration page and delete user pages --- spec/features/accessibility/user_pages_spec.rb | 18 ++++++++++++++++++ .../accessibility/visitor_pages_spec.rb | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/spec/features/accessibility/user_pages_spec.rb b/spec/features/accessibility/user_pages_spec.rb index 6b838b3d3bc..d77edafe6d8 100644 --- a/spec/features/accessibility/user_pages_spec.rb +++ b/spec/features/accessibility/user_pages_spec.rb @@ -138,4 +138,22 @@ expect(page).to be_accessible.according_to :section508, :"best-practice" end + + scenario 'device events page' do + user = sign_in_and_2fa_user + device = create(:device, user: user) + create(:event, user: user) + + visit account_events_path(id: device.id) + + expect(page).to be_accessible.according_to :section508, :"best-practice" + end + + scenario 'delete user page' do + sign_in_and_2fa_user + + visit account_delete_path + + expect(page).to be_accessible.according_to :section508, :"best-practice" + end end diff --git a/spec/features/accessibility/visitor_pages_spec.rb b/spec/features/accessibility/visitor_pages_spec.rb index f08cd2a6333..e99be638cf4 100644 --- a/spec/features/accessibility/visitor_pages_spec.rb +++ b/spec/features/accessibility/visitor_pages_spec.rb @@ -25,4 +25,10 @@ expect(page).to be_accessible.according_to :section508, :"best-practice" end + + scenario 'new user cancel registration page' do + visit sign_up_cancel_path + + expect(page).to be_accessible.according_to :section508, :"best-practice" + end end From 38a55d37c7b6e1e09cf2d867e65fe486f5316bad Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:11:07 -0500 Subject: [PATCH 03/17] Include alt text --- app/presenters/failure_presenter.rb | 3 --- app/views/idv/doc_auth/_back_of_state_id_image.html.erb | 2 +- app/views/idv/doc_auth/_front_of_state_id_image.html.erb | 2 +- app/views/idv/doc_auth/doc_success.html.erb | 2 +- app/views/idv/doc_auth/link_sent.html.erb | 2 +- app/views/idv/doc_auth/upload.html.erb | 4 ++-- app/views/shared/_failure.html.erb | 2 +- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/presenters/failure_presenter.rb b/app/presenters/failure_presenter.rb index f228d58c5a2..bf2474e1526 100644 --- a/app/presenters/failure_presenter.rb +++ b/app/presenters/failure_presenter.rb @@ -4,17 +4,14 @@ class FailurePresenter STATE_CONFIG = { failure: { icon: 'alert/fail-x.svg', - alt_text: 'failure', color: 'red', }, locked: { icon: 'alert/temp-lock.svg', - alt_text: 'locked', color: 'red', }, warning: { icon: 'alert/warning-lg.svg', - alt_text: 'warning', color: 'yellow', }, }.freeze diff --git a/app/views/idv/doc_auth/_back_of_state_id_image.html.erb b/app/views/idv/doc_auth/_back_of_state_id_image.html.erb index c9e7a2c2d39..a4d39a3ff76 100644 --- a/app/views/idv/doc_auth/_back_of_state_id_image.html.erb +++ b/app/views/idv/doc_auth/_back_of_state_id_image.html.erb @@ -1,3 +1,3 @@ -<%= image_tag(asset_url('state-id-back.svg'), height: 140) %> +<%= image_tag(asset_url('state-id-back.svg'), alt: '', height: 140) %>

diff --git a/app/views/idv/doc_auth/_front_of_state_id_image.html.erb b/app/views/idv/doc_auth/_front_of_state_id_image.html.erb index d6a9b083894..24b9fa34377 100644 --- a/app/views/idv/doc_auth/_front_of_state_id_image.html.erb +++ b/app/views/idv/doc_auth/_front_of_state_id_image.html.erb @@ -1,3 +1,3 @@ -<%= image_tag(asset_url('state-id-front.svg'), height: 140) %> +<%= image_tag(asset_url('state-id-front.svg'), alt: '', height: 140) %>

diff --git a/app/views/idv/doc_auth/doc_success.html.erb b/app/views/idv/doc_auth/doc_success.html.erb index 9afab298a46..20a15f1c779 100644 --- a/app/views/idv/doc_auth/doc_success.html.erb +++ b/app/views/idv/doc_auth/doc_success.html.erb @@ -1,6 +1,6 @@ <% title t('doc_auth.titles.doc_auth') %> -<%= image_tag(asset_url('state-id-confirm@3x.png'), width: 210) %> +<%= image_tag(asset_url('state-id-confirm@3x.png'), alt: '', width: 210) %>

<%= t('doc_auth.forms.doc_success') %> diff --git a/app/views/idv/doc_auth/link_sent.html.erb b/app/views/idv/doc_auth/link_sent.html.erb index 36a868e2e16..4c65d01f40d 100644 --- a/app/views/idv/doc_auth/link_sent.html.erb +++ b/app/views/idv/doc_auth/link_sent.html.erb @@ -15,7 +15,7 @@
- <%= image_tag asset_url('idv/phone.png') %> + <%= image_tag asset_url('idv/phone.png'), alt: t('image_description.camera_mobile_phone') %>

<%= t('doc_auth.info.link_sent').first %>

diff --git a/app/views/idv/doc_auth/upload.html.erb b/app/views/idv/doc_auth/upload.html.erb index ba4dbf63f62..c62d48b6795 100644 --- a/app/views/idv/doc_auth/upload.html.erb +++ b/app/views/idv/doc_auth/upload.html.erb @@ -24,8 +24,8 @@
<%= image_tag( - asset_url('idv/phone.png', - alt: t('image_description.camera_mobile_phone')), + asset_url('idv/phone.png'), + alt: t('image_description.camera_mobile_phone'), width: 80, ) %>
diff --git a/app/views/shared/_failure.html.erb b/app/views/shared/_failure.html.erb index 06854c8c584..5a1af2dbd29 100644 --- a/app/views/shared/_failure.html.erb +++ b/app/views/shared/_failure.html.erb @@ -1,6 +1,6 @@ <% title presenter.title %> -<%= image_tag(asset_url(presenter.state_icon), width: 54) %> +<%= image_tag(asset_url(presenter.state_icon), alt: '', width: 54) %>

<%= presenter.header %> From a87e7fbca0d401f1a05ae6da7d89b94a51969f44 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:12:05 -0500 Subject: [PATCH 04/17] Label image upload file input --- app/views/idv/doc_auth/back_image.html.erb | 2 +- app/views/idv/doc_auth/front_image.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/idv/doc_auth/back_image.html.erb b/app/views/idv/doc_auth/back_image.html.erb index b6d602c432d..95248c49359 100644 --- a/app/views/idv/doc_auth/back_image.html.erb +++ b/app/views/idv/doc_auth/back_image.html.erb @@ -5,7 +5,7 @@ <%= render 'idv/doc_auth/back_of_state_id_image' %>

- <%= t('doc_auth.headings.upload_back') %> +

<%= accordion('totp-info', t('doc_auth.tips.title_html')) do %> diff --git a/app/views/idv/doc_auth/front_image.html.erb b/app/views/idv/doc_auth/front_image.html.erb index 45aa3006ee6..fa7ea9c4228 100644 --- a/app/views/idv/doc_auth/front_image.html.erb +++ b/app/views/idv/doc_auth/front_image.html.erb @@ -4,8 +4,8 @@ <%= render 'idv/doc_auth/front_of_state_id_image' %> -

- <%= t('doc_auth.headings.upload_front') %> +

+

<%= accordion('totp-info', t('doc_auth.tips.title_html')) do %> From b28080a35b671d6e7980ab34e5ac1473867a4bdf Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:19:27 -0500 Subject: [PATCH 05/17] Replace h2 with required h1 --- app/views/users/delete/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/delete/show.html.erb b/app/views/users/delete/show.html.erb index 06070167938..e7401d4c663 100644 --- a/app/views/users/delete/show.html.erb +++ b/app/views/users/delete/show.html.erb @@ -1,7 +1,7 @@


<%= t('users.delete.subheading') %> From 304a3e544790207a9ef51ad8d9241780513db7a4 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:20:46 -0500 Subject: [PATCH 06/17] Convert footer to erb --- app/views/shared/_footer_lite.html.erb | 70 +++++++++++++++++++ app/views/shared/_footer_lite.html.slim | 59 ---------------- ..._spec.rb => _footer_lite.html.erb_spec.rb} | 2 +- 3 files changed, 71 insertions(+), 60 deletions(-) create mode 100644 app/views/shared/_footer_lite.html.erb delete mode 100644 app/views/shared/_footer_lite.html.slim rename spec/views/shared/{_footer_lite.html.slim_spec.rb => _footer_lite.html.erb_spec.rb} (96%) diff --git a/app/views/shared/_footer_lite.html.erb b/app/views/shared/_footer_lite.html.erb new file mode 100644 index 00000000000..6498ff02344 --- /dev/null +++ b/app/views/shared/_footer_lite.html.erb @@ -0,0 +1,70 @@ +<% show_language_dropdown = I18n.available_locales.count > 1 +sanitized_requested_url = request.query_parameters.slice(:request_id) %> + +
+ <% if show_language_dropdown %> +
+
+
+ <%= link_to('#', class: 'block text-decoration-none blue fs-13p', 'aria-expanded': 'false') do %> + <%= image_tag asset_url('globe-blue.svg'), width: 12, class: 'mr1', alt: '', + 'aria-hidden': 'true' %><%= t('i18n.language') %> + <% end %> +
+
+
+ + <% end %> +
'> +
+
+ <%= link_to('https://gsa.gov', class: 'flex flex-center text-decoration-none white h6', target: '_blank') do %> + <%= image_tag asset_url('sp-logos/square-gsa.svg'), + width: 20, class: 'mr1 sm-show', alt: '' %> + <%= image_tag asset_url('sp-logos/square-gsa-dark.svg'), + width: 20, class: 'mr1 sm-hide', alt: '' %> + + <%= t('shared.footer_lite.gsa') %> + + <% end %> +
+
+ <% if show_language_dropdown %> +
    +
  • + <%= link_to '#', class: 'white text-decoration-none border border-blue rounded-lg px1 py-tiny', 'aria-expanded': 'false' do %> + <%= image_tag asset_url('globe-white.svg'), width: 12, class: 'mr1', alt: '', + 'aria-hidden': 'true' %> + <%= t('i18n.language') %> + + <% end %> + +
  • +
+ <% end %> + <%= link_to t('links.help'), MarketingSite.help_url, + class: 'caps h6 blue sm-white text-decoration-none mr3', target: '_blank' %> + <%= link_to t('links.contact'), MarketingSite.contact_url, + class: 'caps h6 blue sm-white text-decoration-none mr3', target: '_blank' %> + <%= link_to t('links.privacy_policy'), MarketingSite.privacy_url, + class: 'caps h6 blue sm-white text-decoration-none', target: '_blank' %> +
+
+
+
diff --git a/app/views/shared/_footer_lite.html.slim b/app/views/shared/_footer_lite.html.slim deleted file mode 100644 index 4a41b92d5d6..00000000000 --- a/app/views/shared/_footer_lite.html.slim +++ /dev/null @@ -1,59 +0,0 @@ -- show_language_dropdown = I18n.available_locales.count > 1 -- sanitized_requested_url = request.query_parameters.slice(:request_id) - -footer.footer.bg-light-blue.sm-bg-navy - - if show_language_dropdown - .sm-hide.border-bottom - .container.cntnr-wide.py1.px2.lg-px0.h5 - .i18n-mobile-toggle.center - = link_to '#', class: 'block text-decoration-none blue fs-13p', - 'aria-expanded': 'false' do - = image_tag asset_url('globe-blue.svg'), width: 12, class: 'mr1', alt: '', - 'aria-hidden': 'true' - = t('i18n.language') - span.caret.inline-block.ml-tiny(aria-hidden="true") - | ▾ - .i18n-mobile-dropdown.sm-hide.display-none - ul.list-reset.mb0.white.center - - I18n.available_locales.each do |locale| - li.border-bottom - = link_to t("i18n.locale.#{locale}"), - sanitized_requested_url.merge(locale: locale), - class: 'block py-12p px2 text-decoration-none blue fs-13p' - - .container.py1.px2.lg-px0(class="#{'sm-py0' if show_language_dropdown}") - .flex.flex-center - .flex.flex-auto.flex-first - = link_to('https://gsa.gov', - class: 'flex flex-center text-decoration-none white h6', - target: '_blank') do - = image_tag asset_url('sp-logos/square-gsa.svg'), - width: 20, class: 'mr1 sm-show', alt: '' - = image_tag asset_url('sp-logos/square-gsa-dark.svg'), - width: 20, class: 'mr1 sm-hide', alt: '' - span.sm-show - = t('shared.footer_lite.gsa') - .flex.flex-center - - if show_language_dropdown - ul.list-reset.sm-show.mb0 - li.i18n-desktop-toggle.flex.my1.mx3.relative - = link_to '#', - class: 'white text-decoration-none border border-blue rounded-lg px1 py-tiny', - 'aria-expanded': 'false' do - = image_tag asset_url('globe-white.svg'), width: 12, class: 'mr1', alt: '', - 'aria-hidden': 'true' - = t('i18n.language') - span.caret.inline-block.ml-tiny(aria-hidden="true") - | ▾ - ul.i18n-desktop-dropdown.list-reset.mb0.white.display-none - - I18n.available_locales.each do |locale| - li.border-bottom.border-navy - = link_to t("i18n.locale.#{locale}"), - sanitized_requested_url.merge(locale: locale), - class: 'block pl-24p py2 text-decoration-none white' - = link_to t('links.help'), MarketingSite.help_url, - class: 'caps h6 blue sm-white text-decoration-none mr3', target: '_blank' - = link_to t('links.contact'), MarketingSite.contact_url, - class: 'caps h6 blue sm-white text-decoration-none mr3', target: '_blank' - = link_to t('links.privacy_policy'), MarketingSite.privacy_url, - class: 'caps h6 blue sm-white text-decoration-none', target: '_blank' diff --git a/spec/views/shared/_footer_lite.html.slim_spec.rb b/spec/views/shared/_footer_lite.html.erb_spec.rb similarity index 96% rename from spec/views/shared/_footer_lite.html.slim_spec.rb rename to spec/views/shared/_footer_lite.html.erb_spec.rb index 78196788915..000b5328d69 100644 --- a/spec/views/shared/_footer_lite.html.slim_spec.rb +++ b/spec/views/shared/_footer_lite.html.erb_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'shared/_footer_lite.html.slim' do +describe 'shared/_footer_lite.html.erb' do context 'user is signed out' do before do controller.request.path_parameters[:controller] = 'users/sessions' From 125f9cea2f67a658d8bde1235f545ad135d23a42 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:21:16 -0500 Subject: [PATCH 07/17] Add aria-label to link without text --- app/views/shared/_footer_lite.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_footer_lite.html.erb b/app/views/shared/_footer_lite.html.erb index 6498ff02344..6eec89d96cb 100644 --- a/app/views/shared/_footer_lite.html.erb +++ b/app/views/shared/_footer_lite.html.erb @@ -26,7 +26,7 @@ sanitized_requested_url = request.query_parameters.slice(:request_id) %>
'>
- <%= link_to('https://gsa.gov', class: 'flex flex-center text-decoration-none white h6', target: '_blank') do %> + <%= link_to('https://gsa.gov', class: 'flex flex-center text-decoration-none white h6', target: '_blank', 'aria-label': t('shared.footer_lite.gsa')) do %> <%= image_tag asset_url('sp-logos/square-gsa.svg'), width: 20, class: 'mr1 sm-show', alt: '' %> <%= image_tag asset_url('sp-logos/square-gsa-dark.svg'), From 244c7d4d8ebfe25bbe818660f0d4fef3008173a8 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:23:54 -0500 Subject: [PATCH 08/17] Convert event_item to erb --- app/views/accounts/_event_item.html.erb | 13 +++++++++++++ app/views/accounts/_event_item.html.slim | 7 ------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 app/views/accounts/_event_item.html.erb delete mode 100644 app/views/accounts/_event_item.html.slim diff --git a/app/views/accounts/_event_item.html.erb b/app/views/accounts/_event_item.html.erb new file mode 100644 index 00000000000..c7ae1bb64db --- /dev/null +++ b/app/views/accounts/_event_item.html.erb @@ -0,0 +1,13 @@ +
+
+
+
+ <%= event.event_type %> +
+ <%= event.last_sign_in_location_and_ip %> +
+
+ <%= local_time(event.happened_at, t('time.formats.event_timestamp')) %> +
+
+
diff --git a/app/views/accounts/_event_item.html.slim b/app/views/accounts/_event_item.html.slim deleted file mode 100644 index 5be8a0f69a5..00000000000 --- a/app/views/accounts/_event_item.html.slim +++ /dev/null @@ -1,7 +0,0 @@ -.p2.clearfix.border-top - .clearfix.mxn1 - .sm-col.sm-col-6.px1 - .bold.truncate = event.event_type - = event.last_sign_in_location_and_ip - .sm-col.sm-col-6.px1.sm-right-align - = local_time(event.happened_at, t('time.formats.event_timestamp')) From 3b67ae5b4e33f81563964a8243b5f1db0e7f3bb4 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:29:43 -0500 Subject: [PATCH 09/17] Convert verified account badge to erb --- app/views/accounts/_verified_account_badge.html.erb | 5 +++++ app/views/accounts/_verified_account_badge.html.slim | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 app/views/accounts/_verified_account_badge.html.erb delete mode 100644 app/views/accounts/_verified_account_badge.html.slim diff --git a/app/views/accounts/_verified_account_badge.html.erb b/app/views/accounts/_verified_account_badge.html.erb new file mode 100644 index 00000000000..b8300870807 --- /dev/null +++ b/app/views/accounts/_verified_account_badge.html.erb @@ -0,0 +1,5 @@ + + <%= image_tag asset_url('alert/success.svg'), width: 16, + class: 'mr1 align-middle', id: 'verified_account_badge' %> + <%= t('headings.account.verified_account') %> + diff --git a/app/views/accounts/_verified_account_badge.html.slim b/app/views/accounts/_verified_account_badge.html.slim deleted file mode 100644 index 51d9f4cdaff..00000000000 --- a/app/views/accounts/_verified_account_badge.html.slim +++ /dev/null @@ -1,4 +0,0 @@ -span - = image_tag asset_url('alert/success.svg'), width: 16, - class: 'mr1 align-middle', id: 'verified_account_badge' - = t('headings.account.verified_account') From 3d05eb6f45bfb041bddf00bf7e5a01c1b749b695 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:30:30 -0500 Subject: [PATCH 10/17] Add alt text to verified account badge --- app/views/accounts/_verified_account_badge.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/accounts/_verified_account_badge.html.erb b/app/views/accounts/_verified_account_badge.html.erb index b8300870807..f0183c4a15f 100644 --- a/app/views/accounts/_verified_account_badge.html.erb +++ b/app/views/accounts/_verified_account_badge.html.erb @@ -1,5 +1,5 @@ <%= image_tag asset_url('alert/success.svg'), width: 16, - class: 'mr1 align-middle', id: 'verified_account_badge' %> + class: 'mr1 align-middle', id: 'verified_account_badge', alt: '' %> <%= t('headings.account.verified_account') %> From 209a8d4f55a99b9d3c0b38bf07b91f3b90d5d2cd Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:31:44 -0500 Subject: [PATCH 11/17] Convert events show to erb --- app/views/events/show.html.erb | 19 +++++++++++++++++++ app/views/events/show.html.slim | 15 --------------- 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 app/views/events/show.html.erb delete mode 100644 app/views/events/show.html.slim diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb new file mode 100644 index 00000000000..c63e05f4a7a --- /dev/null +++ b/app/views/events/show.html.erb @@ -0,0 +1,19 @@ +<% content_for(:nav) do %> + <%= render 'accounts/nav_auth', greeting: @view_model.header_personalization %> +<% end %> + +<% title t('titles.account') %> + +
+
+ <%= t('headings.account.account_history') %> + <%= image_tag asset_url('history.svg'), alt: '', width: 12, class: 'ml1' %> +
+ <%= @device.device_name %> +
+ <% @events.each do |event| %> + <%= render event.event_partial, event: event %> + <% end %> +
+ +<%= link_to cancel_link_text, account_path, class: 'h5' %> diff --git a/app/views/events/show.html.slim b/app/views/events/show.html.slim deleted file mode 100644 index 6b724ef5dae..00000000000 --- a/app/views/events/show.html.slim +++ /dev/null @@ -1,15 +0,0 @@ -- content_for(:nav) do - = render 'accounts/nav_auth', greeting: @view_model.header_personalization - -- title t('titles.account') - -.mb3.profile-info-box - .bg-lightest-blue.pb1.pt1.px2.h6.caps.clearfix - = t('headings.account.account_history') - = image_tag asset_url('history.svg'), alt: '', width: 12, class: 'ml1' - br - = @device.device_name - - @events.each do |event| - = render event.event_partial, event: event - -= link_to cancel_link_text, account_path, class: 'h5' From 66f9da13cb89e1e6a3ea4d80b0acf159a5910349 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 11:26:57 -0500 Subject: [PATCH 12/17] Put header on device events page --- app/views/events/show.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index c63e05f4a7a..f0dee2d91f0 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -4,12 +4,13 @@ <% title t('titles.account') %> +

+ <%= t('headings.account.account_history') %> +

- <%= t('headings.account.account_history') %> - <%= image_tag asset_url('history.svg'), alt: '', width: 12, class: 'ml1' %> -
<%= @device.device_name %> + <%= image_tag asset_url('history.svg'), alt: '', width: 12, class: 'ml1' %>
<% @events.each do |event| %> <%= render event.event_partial, event: event %> From 7b120a508f81baf8d32c03dd35ecbc71497bd951 Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 10:39:13 -0500 Subject: [PATCH 13/17] Fix webauthn input label --- app/views/users/webauthn_setup/new.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/users/webauthn_setup/new.html.erb b/app/views/users/webauthn_setup/new.html.erb index 52d99e72020..3d6a7c5604c 100644 --- a/app/views/users/webauthn_setup/new.html.erb +++ b/app/views/users/webauthn_setup/new.html.erb @@ -21,10 +21,9 @@ <%= hidden_field_tag :webauthn_public_key, '', id: 'webauthn_public_key' %> <%= hidden_field_tag :attestation_object, '', id: 'attestation_object' %> <%= hidden_field_tag :client_data_json, '', id: 'client_data_json' %> - <%= label_tag 'code', t('forms.webauthn_setup.nickname'), class: 'block bold' %> + <%= label_tag 'code', t('forms.webauthn_setup.nickname'), class: 'block bold', for: 'nickname' %> <%= text_field_tag :name, '', required: true, id: 'nickname', - class: 'block col-12 field monospace', size: 16, maxlength: 20, - 'aria-labelledby': 'totp-label' %> + class: 'block col-12 field monospace', size: 16, maxlength: 20 %>
<%= hidden_field_tag 'remember_device', false, id: 'remember_device_preference' %> <%= check_box_tag 'remember_device', true, @presenter.remember_device_box_checked?, class: 'my2 ml2 mr1' %> From 959216797359b2a72e67d06fcd504b8e0b9928fe Mon Sep 17 00:00:00 2001 From: Mitchell Henke Date: Fri, 31 Jul 2020 15:54:32 -0500 Subject: [PATCH 14/17] Update app/views/shared/_footer_lite.html.erb Co-authored-by: Zach Margolis --- app/views/shared/_footer_lite.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_footer_lite.html.erb b/app/views/shared/_footer_lite.html.erb index 6eec89d96cb..e2f9d6376c9 100644 --- a/app/views/shared/_footer_lite.html.erb +++ b/app/views/shared/_footer_lite.html.erb @@ -1,5 +1,7 @@ -<% show_language_dropdown = I18n.available_locales.count > 1 -sanitized_requested_url = request.query_parameters.slice(:request_id) %> +<% + show_language_dropdown = I18n.available_locales.count > 1 + sanitized_requested_url = request.query_parameters.slice(:request_id) +%>