Presentation at The Accessibility Conference 2014 by Sandy Feldman and Tom Auger, covering high-level audits and best practices to bring a theme in line with WCAG / AODA guidelines.
25. • Use an accessible theme
• It’s possible to tinker with the php to
make the site better
• Keep the site semantic when you add
content, either by writing semantic HTML
or by using the WordPress wysiwyg
• Make sure link text makes sense out of
context
• Write alt text for images
28. A11y Team Theme Audit
make.wordpress.org/themes/guidelines
/guidelines-accessibility/
•Images
•Media, sliders, animations
•Headings
•Link text
•Keyboard navigation
•Contrast
•Skip Links
•Forms
29. Use the Theme Audit When…
• Evaluating a theme
• Adapting a theme for clients
• Creating a base theme
• Contributing to the theme repository
30. Theme Images Audit
• No <img> for decorative images
• Appropriate alt text for all theme <img>
• Evaluation using simple decision tree
dev.w3.org/html5/alt-techniques/#tree
31. Theme Media Use Audit
• No autoplay of videos, audio or animations
• This includes sliders
• Consider WCAG Guideline 2.2 (“A”):
“Provide users enough time to read and use content.”
– Timing Adjustable (2.2.1)
– Pause, Stop, Hide (2.2.2)
www.w3.org/TR/WCAG20/#time-limits
32. Theme Structure Audit
• H1 for page Title
• Headings for subsections
– Post titles in archives
– Widget titles
33. Theme Link Text Audit
• No “bare URLs”
• Avoid non-contextual “read more”
35. Accessible <!-- more -->
the_content(
'Read more
<span class="screen-reader-text">
about ' . get_the_title() .
'</span>'
);
codex.wordpress.org
/Customizing_the_Read_More
36. Keyboard Navigation Audit
• Visual focus – use CSS :focus
• Intuitive tab order
• No ‘tabindex’ > 0
• No ‘accesskey’ defined
37. Theme Skip Links Audit
• Allow users to skip to content, navigation
• First keyboard focused item
• May be hidden initially but
– Must be visible to screen readers
– Must be visible on focus
38. Theme Contrast Audit
• “Body” text must meet WCAG AA
contrast ratio (4.5 : 1)
snook.ca/technical/colour_contrast
/colour.html
39. Theme Forms Audit
• <label> for each form control
• All content must be associated with a
control (aria-describedby)
• Messages and errors must be accessible to
screen readers
40. Form Plugins
(with some degree of accessibility)
• Contact Form 7 (3.8.x)
• Visual Form Builder (Pro)
• Gravity Forms
41. Plugins?
• Joe Dolson’s a11y plugin
• Zeitguys Accessibility Bar plugin (mid
2014)
• long-description-for-image-attachments
44. Theme Customization Best Practice
“Parent + Child Theme”
• Choose (an accessible) Parent theme
• Create a Child theme
• Make modifications in Child theme
45. Create a Child Theme
• Install a suitable Parent theme
• Create a new directory in wp-
content/themes
• Add style.css to this directory
• Activate the Child theme
• Don’t delete the Parent theme!
46. Basic childtheme/style.css
/*
Theme Name: My Child Theme
Description: A short description of what your
theme is all about.
Author: Tom Auger
Template: twentyfourteen
*/
@import url("../twentyfourteen/style.css");
codex.wordpress.org/Child_Themes
graphic designer
front end coder
Interest in accessibility
1st accessible site Toronto Trailblazers, in 2006
Alan Cantor accessibility consultant
2006 IE6 commonly used / outdated. Needed 6 specific hacks. Make it work for 6, make it work for assistive tech.
more user agents, last longer, and enhances search engine optimization
worked on the early cell phones when people turned off styles
In 2007 CMS introduced errors and almost every update broke validation. That experience steered me away from content management systems.
Client demand and CMS improvements have brought me back around
Working on a new site, I decided on WordPress. total newbie going to develop a custom theme, got help from Zeitguys
Possibly most commonly used cms
Free and open source
Theme – collection of files that control how a site looks and how the code is structured. Some free, some premium
wordpress.org – biggest collection of free themes
wordpress.com, other developers/designers provide premium & custom themes
Searching for “accessibility ready” comes back with 13 themes. That is not all there is. These have passed a review to check they conform with the WP guidelines.
Full control of look & feel start with a “naked” theme
Zeitguys recommended underscores
A few of the things about underscores that got changed:
redundant <h1> out of the banner so using headings to skim doesn’t mean “department of redundancy department” on every page
Things to cover training the person who will maintain the site
Toggle the toolbar to add functionality
use headings, and use them right
describe the content that they precede
break the page down logically
Older versions WP have paste from Word introduces cruft. Use paste as text or better compose in WP.
Writing alt text is an art.
Link text should describe the resource that it links to.
careful with the "title" attribute. screen readers can be, and often are, set to not read it, and it often adds redundancy.
validate your page after you do an update to check if any errors were introduced
Aaron Jorbin
Joe Dolson
Joseph Karr O’Connor
Andy McIlwain
Jordan Quintal
.screen-reader-text already defined in Twenty Fourteen
the_content_more_link
excerpt_more
May need to remove_filter()
after_setup_theme
Tabindex 0 = non link can receive focus
Tabindex -1 = item taken out of flow but can receive programmatic focus