Skip to content

Commit

Permalink
Enable WCAG 2.2 tests with an additional tag/test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jun 20, 2024
1 parent 35ab401 commit c95d87e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- sparks
- bjc4nyc_teacher
- sparks-teacher
suite:
- wcag20
- wcag22
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
Expand All @@ -27,4 +30,4 @@ jobs:
ruby-version: 3.2.2
bundler-cache: true
- name: ${{ matrix.course }} - a11y tests
run: bundle exec rspec utilities/spec --tag ${{ matrix.course }}
run: bundle exec rspec utilities/spec --tag ${{ matrix.course }} --tag ${{ matrix.suite }}
15 changes: 7 additions & 8 deletions utilities/spec/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def load_all_urls_in_course(course)
end

# These tests should always be enabled.
it 'according to WCAG 2.0 AA' do
it 'according to WCAG 2.0 AA', wcag20: true do
if page.html.match?(/File not found:/)
skip("TODO: #{url} is a 404 page.")
end
Expand All @@ -116,13 +116,12 @@ def load_all_urls_in_course(course)
.excluding(*excluded_elements)
end

# TODO: This is commented out just to reduce the noise...
# it 'according to WCAG 2.2 and all additional standards', :skip do
# expect(page).to be_axe_clean
# .according_to(*complete_a11y_standards)
# .skipping(*skipped_rules)
# .excluding(*excluded_elements)
# end
it 'according to WCAG 2.2 and all additional standards', wcag22: true do
expect(page).to be_axe_clean
.according_to(*complete_a11y_standards)
.skipping(*skipped_rules)
.excluding(*excluded_elements)
end
end
end
end

0 comments on commit c95d87e

Please sign in to comment.