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/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')) 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..f0183c4a15f --- /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', alt: '' %> + <%= 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') diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb new file mode 100644 index 00000000000..f0dee2d91f0 --- /dev/null +++ b/app/views/events/show.html.erb @@ -0,0 +1,20 @@ +<% content_for(:nav) do %> + <%= render 'accounts/nav_auth', greeting: @view_model.header_personalization %> +<% end %> + +<% title t('titles.account') %> + +

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

+
+
+ <%= @device.device_name %> + <%= image_tag asset_url('history.svg'), alt: '', width: 12, class: 'ml1' %> +
+ <% @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' 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/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/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/front_image.html.erb b/app/views/idv/doc_auth/front_image.html.erb index 45aa3006ee6..b71c99bd4ab 100644 --- a/app/views/idv/doc_auth/front_image.html.erb +++ b/app/views/idv/doc_auth/front_image.html.erb @@ -5,7 +5,7 @@ <%= 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 %> 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 %> diff --git a/app/views/shared/_footer_lite.html.erb b/app/views/shared/_footer_lite.html.erb new file mode 100644 index 00000000000..e2f9d6376c9 --- /dev/null +++ b/app/views/shared/_footer_lite.html.erb @@ -0,0 +1,72 @@ +<% + 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', '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'), + 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/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') %> 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' %> 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/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 diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index 7fd777ba751..e84f25c19cd 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -86,18 +86,21 @@ 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 @@ -107,8 +110,9 @@ def complete_doc_auth_steps_before_mobile_document_capture_step click_on t('doc_auth.buttons.use_phone') 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 @@ -123,14 +127,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 @@ -141,26 +147,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 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'