Skip to content

Commit

Permalink
Remove axe exceptions for unused typeahead and bootstrap 4
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 21, 2024
1 parent db5d87f commit ed46c97
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions spec/features/axe_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,31 @@
RSpec.describe 'Accessibility testing', :js, api: false do
it 'validates the home page' do
visit root_path
expect(page).to be_accessible
expect(page).to be_axe_clean
end

it 'validates the catalog page' do
visit root_path
fill_in "q", with: 'history'
click_on 'search'

expect(page).to be_accessible
expect(page).to be_axe_clean

within '.accordion-item.blacklight-language_ssim' do
click_on 'Language'
click_on "Tibetan"
end

expect(page).to be_accessible
expect(page).to be_axe_clean
end

it 'validates the advanced search form' do
visit advanced_search_catalog_path
expect(page).to be_accessible
expect(page).to be_axe_clean
end

it 'validates the single results page' do
visit solr_document_path('2007020969')
expect(page).to be_accessible
end

def be_accessible(skipping: [])
# typeahead does funny things with the search bar
be_axe_clean.excluding('.tt-hint').skipping(skipping + [('color-contrast' if defined?(Bootstrap) && Bootstrap::VERSION < '5')].compact)
expect(page).to be_axe_clean
end
end

0 comments on commit ed46c97

Please sign in to comment.