From b131447333bd2d8bf299ee402aa12f7edf88cbfa Mon Sep 17 00:00:00 2001 From: Andrew Duthie <1779930+aduth@users.noreply.github.com> Date: Tue, 3 Sep 2024 14:42:26 -0400 Subject: [PATCH] Run all relevant Axe accessibility test groups (#11189) * Run Axe scan against all WCAG 2.0-2.2 A & AA changelog: Internal, Accessibility Tests, Run Axe scan against all WCAG 2.0-2.2 A & AA * Exclude intl-tel-input from accessibility test --- Gemfile.lock | 6 +++--- spec/support/matchers/accessibility.rb | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3173e2b63f0..7eeaf41a00a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -197,11 +197,11 @@ GEM aws-sigv4 (~> 1.1) aws-sigv4 (1.9.1) aws-eventstream (~> 1, >= 1.0.2) - axe-core-api (4.9.1) + axe-core-api (4.10.0) dumb_delegator virtus - axe-core-rspec (4.9.1) - axe-core-api (= 4.9.1) + axe-core-rspec (4.10.0) + axe-core-api (= 4.10.0) dumb_delegator virtus axiom-types (0.1.1) diff --git a/spec/support/matchers/accessibility.rb b/spec/support/matchers/accessibility.rb index 00a34431f46..49d6a0dd681 100644 --- a/spec/support/matchers/accessibility.rb +++ b/spec/support/matchers/accessibility.rb @@ -337,7 +337,17 @@ def fieldset_legend_name(element) end def expect_page_to_have_no_accessibility_violations(page, validate_markup: true) - expect(page).to be_axe_clean.according_to(:wcag22aa, :"best-practice") + expect(page).to be_axe_clean.according_to( + :wcag2a, + :wcag2aa, + :wcag21a, + :wcag21aa, + :wcag22a, + :wcag22aa, + :"best-practice", + ).excluding( + '.iti__selected-flag', # See: LG-14382 + ) expect(page).to have_unique_ids expect(page).to have_valid_idrefs expect(page).to label_required_fields