A presentation at WordCamp Edinburgh on 23.07.17.
I demoed various plugins to test their accessibility with keyboard alone and VoiceOver screen reader:
- NextGEN Gallery
- MailMunch
- Sumo
- Gravity Forms
For the video demos please visit the YouTube version of this presentation at https://www.youtube.com/watch?v=kR1R300OL-c
2. Why Does Plugin Accessibility
Matter?
โข WordPress is used by 28.3% of all websites โจ
โจ
(https://w3techs.com/technologies/details/cm-wordpress/all/
all)
โข Over 51,000 plugins are available on WordPress.org
โข 1 in 5 people in the UK have a disabilityโจ
โจ
(https://www.gov.uk/government/uploads/system/uploads/
attachment_data/๏ฌle/600465/family-resources-
survey-2015-16.pdf)
3. How To Test Plugins For
Accessibility?
โข Keyboard (motor disability)
โข Screen reader (visual impairment). Free ones are:
โข NVDA (Windows) - best with Firefox โจ
https://www.nvaccess.org
โข VoiceOver (Mac & iOS, built-in) - best with Safariโจ
4. If We Find Plugin Accessibility
Issues, How Can We Fix Them?
โข Leave a message on WordPress.org forumsโจ
โข Premium plugins: contact their supportโจ
โข Use a plugin to improve the accessibility of the one we want
to useโจ
โข Find alternative plugins without accessibility issues
6. Which Are The Main
Focusable HTML Elements?
โข Links <a>
โข Form elements e.g. <input>
โข Buttons <button>
โข https://allyjs.io/data-tables/focusable.html
7. Making Other HTML
Elements Focusable
The tabindex value can allow for some interesting
behaviour.
โข If given a value of "-1", the element can't be tabbed to but
focus can be given to the element programmatically
(using element.focus()).โจ
โข If given a value of 0, the element can be focused via the
keyboard and falls into the tabbing flow of the document.โจ
โข https://snook.ca/archives/accessibility_and_usability/
elements_focusable_with_tabindex
11. How To Navigate With The
Keyboard
โข Tab key to go forwards
โข Shift + Tab to go backwards
โข Enter to click link/button
โข Space to activate buttons /
check checkboxes
12. How To Navigate With The
Keyboard
โข Arrow keys to navigate radioโจ
buttons
โข Esc key to close dialogs
โข If something is accessible via
keyboard, itโs normally
accessible via a screen
reader too
14. How Should An Accessible
Lightbox Work?
โข The trigger to open the lightbox must get keyboard focus.
โข There should be a warning that a new window will open.
โข Focus must go to the lightbox when opened, and be visible.
โข Lightbox image(s) must have alt text.
โข Tabbing must cycle round the links within the lightbox until dismissed.
โข Focus must return to the element on the page which the lightbox was
opened from.
โข http://www.cool๏ฌelds.co.uk/2011/12/speci๏ฌcation-for-an-accessible-lightbox/
17. Nextgen Gallery Test Results
(Keyboard)
โข No instructions given that clicking on a thumbnail will open a larger image.
โข The focus style on the thumbnails is very hard to see.
โข Opens the lightbox but the focus remains in the window below. So tabbing
through I could return to an unexpected place.
โข Canโt focus on the lightbox X to close. Only the Esc key works.
โข Arrow keys move the lightbox images forward/back - but is this obvious
to users?
19. NextGEN Gallery Test Results
(VoiceOver)
โข Focus style is better thanks toVoiceOverโs default style.
โข We had the same issues with the focus not moving to the lightbox.
โข VoiceOver read out the ๏ฌlename for most of the thumbnail images. Itโs
not enough to add the alt text in WordPress Media Library - you must add it
in Next Gen Galleryโs settings too.
โข Image links should tell the user the destination of the link, so should read
something like โOpen a panel with larger version of ๏ฌgure holding a bunch
of grapes in close-upโ.
20. NextGEN Gallery Test Results
โข The trigger to open the lightbox must get keyboard focus. โ
โข There should be a warning that a new window will open. โ
โข Focus must go to the lightbox when opened, and be visible. โ
โข Lightbox image(s) must have alt text. โ
โข Tabbing must cycle round the links within the lightbox until dismissed. โ
โข Focus must return to the element on the page which the lightbox was
opened from. โ
21. What We Can Do To Fix
Lightbox Accessibility Issues?
โข Add alt text to images (the NextGEN Gallery way) and use descriptive
๏ฌlenames.
โข Raise issues with the pluginโs developer on the WordPress.org forums.
โข No suitable replacement plugin, unfortunately.
โข Lity is an accessible lightbox but isnโt in the form of a WordPress plugin. It
doesnโt show multiple images.
โข http://sorgalla.com/lity/
25. MailMunch Test Results
โข Not keyboard accessible - focus remains behind the modal, on the page.
โข Even the Esc key didnโt work.
โข No email subscribers for you!
28. Sumo Test Results
โข The trigger to open the modal must get keyboard focus. โ
โข There should be a warning that a new window will open. โ
โข Focus must go to the modal when opened, and be visible. โ
โข Tabbing must cycle round the links within the modal until dismissed. โ
โข Focus must return to the element on the page which the modal was
opened from. โ
30. How Should Accessible Forms
Work?
โข All inputs should have a form label, and the label
should be associated with the form control via an id
attribute.
โข Related form elements e.g. radio buttons or
checkboxes should be grouped in a <๏ฌeldset> with a
<legend>.
โข Error messages should be highlighted. For screen
reader users it helps if the errors are listed above the
form.
37. Gravity Forms + Plugins
โข All inputs should have a form label, and the label should
be associated with the form control via an id attribute.
โ
โข Related form elements e.g. radio buttons or checkboxes
should be grouped in a <๏ฌeldset> with a <legend>. โ
โข Error messages should be highlighted. For screen reader
users it helps if the errors are listed above the form. โ
38. Summary
โข Plugin developers have a responsibility to code their plugins
for everyone
โข These plugins are used on millions of sites
โข Accessible features are better coded in from the start, but
problems can be ๏ฌxed if you know how
โข Accessible plugins = more accessible sites = better for all!