projectblacklight / arclight

A Rails engine supporting discovery of archival material
https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211890/ArcLight
Other
39 stars 26 forks source link

Determine accessibility testing strategies #206

Closed anarchivist closed 7 years ago

anarchivist commented 7 years ago

Per #9, Stanford and NLM both have a requirement for ArcLight to be accessible per the WCAG 2.0 AA-level guidelines. We need to determine a testing strategy, and a flow for new tickets, etc. to become created.

In addition to the core team, John Rees from NLM is also interested in contributing.

jkeck commented 7 years ago

Not sure if we have any experience using https://github.com/Casecommons/capybara-accessible but it might be worth looking into.

anarchivist commented 7 years ago

Thanks, @jkeck!

<caveat> We haven't discussed this in depth yet, and will likely want the a11y testing to be at least partially human-mediated </caveat>... but I've also been experimenting a little bit with incorporating axe-matchers into our specs, which uses the aXe API. Seems relatively straightforward:

diff --git a/spec/features/collection_page_spec.rb b/spec/features/collection_page_spec.rb
index 9dc28a9..816d3e7 100644
--- a/spec/features/collection_page_spec.rb
+++ b/spec/features/collection_page_spec.rb
@@ -7,6 +7,12 @@ RSpec.describe 'Collection Page', type: :feature do
     visit solr_document_path(id: 'aoa271')
   end

+  describe 'accessibility review', driver: :poltergeist do
+    it 'complies to WCAG 2.0 AA guidelines' do
+      expect(page).to be_accessible.within('#main-container').according_to :wcag2aa
+    end
+  end
+
   describe 'arclight document header' do
     it 'includes a card with the repository' do
       within('.card.document-header') do
ggeisler commented 7 years ago

That looks interesting @anarchivist. For the Hyku project, Jeremy also suggested the capybara-accessible gem @jkeck points to, but I don't believe we've added it to the project yet.

We won't be able to avoid human review for accessibility but I agree that integrating an automated tool would be great as a first-pass at identifying issues. I don't have enough knowledge to suggest which we try but it would be great to try something and see what it gets us.

mejackreed commented 7 years ago

I've used capybara-accessible in other projects before or at least tried to. We ran into a lot of false positives and ultimately never merged it in for that reason.

anarchivist commented 7 years ago

See #214 for my (not very sophisticated) examples of using axe-matchers.