Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background-color in highlighting that passes WCAG AAA with contrast ratio 8.27:1 #3833

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/stylesheets/components/search-results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ dd.blacklight-electronic_access_display {
margin: 1em 0 0.5em 0;
}
}

em.highlight-query {
background-color: #FFFDD0;
}
11 changes: 11 additions & 0 deletions spec/features/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@
.excluding('.blacklight-series_display[dir="ltr"]:nth-child(1) > .more-in-series[title=""][data-toggle="tooltip"]')
end
end
context "search results page" do
before do
allow(Flipflop).to receive(:highlighting?).and_return(true)
end

it 'complies with wcag2aa wcag21a' do
visit '/catalog?q=black+teenagers'
expect(page).to be_axe_clean
.according_to(:wcag2a, :wcag2aa, :wcag21a, :wcag21aa)
end
end
end