Skip to content

Commit

Permalink
Run all relevant Axe accessibility test groups (#11189)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aduth authored Sep 3, 2024
1 parent e82d6c9 commit b131447
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 11 additions & 1 deletion spec/support/matchers/accessibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b131447

Please sign in to comment.