From 1eee4f9c8948a65089571b741e11b0c9d1868691 Mon Sep 17 00:00:00 2001 From: Kevin Masters <135744319+kevinsmaster5@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:51:08 -0500 Subject: [PATCH 01/13] LG-12465 VPAT 1.1.1 Safari VoiceOver svg with null alt (#10200) * changelog: Bug Fixes, Accessibility, Safari use of VoiceOver reading alt=null images * add ability to check for role in svg * change role from 'img' to 'presentation' * reset role to img * revert test for svg role * fix lint * add skipping method to axe_clean violation test * make axe exclude more specific * add comment explaining exclude matcher --- app/components/badge_component.html.erb | 2 +- app/views/mfa_confirmation/show.html.erb | 2 +- .../openid_connect/logout/index.html.erb | 2 +- .../_mfa_selection.html.erb | 2 +- app/views/shared/_footer_lite.html.erb | 2 +- .../_sp_registration_heading.html.erb | 2 +- .../users/backup_code_setup/reminder.html.erb | 2 +- app/views/users/webauthn_setup/new.html.erb | 2 +- spec/support/matchers/accessibility.rb | 30 ++++++++++++++++++- 9 files changed, 37 insertions(+), 9 deletions(-) diff --git a/app/components/badge_component.html.erb b/app/components/badge_component.html.erb index da8b6c8a2ed..4514b4de4d3 100644 --- a/app/components/badge_component.html.erb +++ b/app/components/badge_component.html.erb @@ -1,4 +1,4 @@ <%= content_tag('div', **tag_options, class: ['lg-verification-badge', *tag_options[:class]]) do %> - <%= image_tag(asset_path("alerts/#{icon}.svg"), size: 16, alt: '') %> + <%= image_tag(asset_path("alerts/#{icon}.svg"), size: 16, alt: '', role: 'img') %> <%= content %> <% end %> diff --git a/app/views/mfa_confirmation/show.html.erb b/app/views/mfa_confirmation/show.html.erb index fca5ca3d3b6..d88f2569c95 100644 --- a/app/views/mfa_confirmation/show.html.erb +++ b/app/views/mfa_confirmation/show.html.erb @@ -1,6 +1,6 @@ <% self.title = @content.heading %> -<%= image_tag asset_url('user-signup-ial1.svg'), width: 107, height: 119, alt: '', class: 'margin-bottom-4' %> +<%= image_tag asset_url('user-signup-ial1.svg'), width: 107, height: 119, alt: '', class: 'margin-bottom-4', role: 'img' %> <%= render PageHeadingComponent.new.with_content(@content.heading) %> diff --git a/app/views/openid_connect/logout/index.html.erb b/app/views/openid_connect/logout/index.html.erb index f0f46059050..0e474590447 100644 --- a/app/views/openid_connect/logout/index.html.erb +++ b/app/views/openid_connect/logout/index.html.erb @@ -1,7 +1,7 @@ <% self.title = t('openid_connect.logout.heading', app_name: APP_NAME) %>