Title: WordPress Theme Pattern Library for Accessibility
Author: David A. Kennedy
Published: January 15, 2015
Last modified: February 11, 2015

---

 [  ](https://profiles.wordpress.org/davidakennedy/) [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)
5:08 am _on_ January 15, 2015     
Tags: [Theme Pattern Library ( 3 )](https://make.wordpress.org/accessibility/tag/theme-pattern-library/)

# WordPress Theme Pattern Library for Accessibility

We want to make creating [accessibility-ready themes](https://make.wordpress.org/themes/handbook/review/accessibility/)
as easy possible. To do that, we’re working on building a library of accessible 
patterns for themes. That way, theme authors can learn about and implement accessibilityAccessibility
Accessibility (commonly shortened to a11y) refers to the design of products, devices,
services, or environments for people with disabilities. The concept of accessible
design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning
compatibility with a person’s assistive technology (for example, computer screen
readers). (https://en.wikipedia.org/wiki/Accessibility) in their themes with ease.

## Goals

The goals are simple:

 * Become a central resource for WordPress theme developers to learn about and how
   to implement accessible patterns for accessibility-ready themes.
 * Patterns should be self contained and have as few dependencies as possible.
 * Be a codebase that gets tested rigorously, evolves constantly and keeps it simple.

## Pattern Ideas

I have a handful of pattern ideas that should be included, most of which help meet
the current [accessibility-ready requirements](https://make.wordpress.org/themes/handbook/review/accessibility/required/).
This isn’t an exhaustive list, of course, and other patterns would be needed and
welcomed.

 * Skip link (in Underscores)
 * Mobile menu toggle (in Underscores)
 * Menu drawyer, expand from side
 * Menu overlay
 * Continue reading links (in Underscores, partly)
 * Form label and field patterns (start with CoreCore Core is the set of software
   required to run WordPress. The Core Development Team builds WordPress. markup
   and expand on that.)
 * Outline/:focus style examples
 * Tabs
 * Accordion

## Implementation

After feedback from the Accessibility team, especially in a [recent meeting](https://wordpress.slack.com/archives/accessibility/p1421261701000056),
I think the best way to implement is:

 * **Giving each pattern its own repository**: Each pattern (including whatever 
   HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language
   that is used in the development of web pages and websites., CSSCSS CSS is an 
   acronym for cascading style sheets. This is what controls the design or look 
   and feel of a site., JS and PHPPHP PHP (recursive acronym for PHP: Hypertext 
   Preprocessor) is a widely-used open source general-purpose scripting language
   that is especially suited for web development and can be embedded into HTML. 
   [https://www.php.net/manual/en/index.php](https://www.php.net/manual/en/index.php)
   needed) would be in a self-contained repository under this [Github organization](https://github.com/wpaccessibility).
   Theme authors could just download the repos, drop in the code and go.
 * **A page that explains the different patterns and their purpose**. This would
   probably be a page in our future handbook or on our [Make site](https://make.wordpress.org/accessibility/).
 * **A link to a demo**. Showing the working pattern would be nice, but not a requirement.
   I would like to see different patterns created first before we worry about this
   aspect. To me, this comes later.

## What’s Next

This is only a rough list of basic steps:

 * Start working on patterns needed for accessibility-ready themes.
 * Establish a code contribution policy.
 * Develop a testing policy.
 * Test patterns as they get created.
 * Release patterns.

We can release one pattern at a time really, as we create and test them.

## Questions

**I have an idea for a pattern. Can I work on it**? Yes, just let me know in the
comments, so I can keep track of who’s doing what and make sure we don’t have people
working on the same pattern. That way, I can connect people for collaboration.

**How do I get access to the WPAccessibility repositories so I can commit code, 
etc.**? You should develop the pattern on your own GithubGitHub GitHub is a website
that offers online implementation of git repositories that can easily be shared,
copied and modified by other developers. Public repositories are free to host, private
repositories require a paid subscription. GitHub introduced the concept of the ‘
pull request’ where code changes done in branches by contributors can be reviewed
and discussed before being merged by the repository owner. [https://github.com/](https://github.com/)
account or locally first. Once I have a list of patterns being worked on, we’ll 
create repositories for them and go from there. We will likely adopt the [fork and pull method](https://help.github.com/articles/using-pull-requests/#fork--pull).

**What about theme frameworks? Can I submit a pattern for it**? Yes, we’d like to
cover as many methods of theming as possible.

**Can I include Sass, Less, Grunt, Gulp, build tool, etc.**? For now, please create
patterns with as few dependencies as possible. Accessibility can be intimidating
and we want keep the barrier to entry as low as possible.

If you want to be involved, make sure you’re following this blog. You’ll see updates
here. If you have other ideas or questions, let us know in the comments.

[#theme-pattern-library](https://make.wordpress.org/accessibility/tag/theme-pattern-library/)

### Share this:

 * [  Threads ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=bluesky)
 * [  LinkedIn ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=linkedin)
 * [  X ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=x)
 * [  Facebook ](https://make.wordpress.org/accessibility/2015/01/15/wordpress-theme-pattern-library-for-accessibility/?share=facebook)

 1.  ![](https://secure.gravatar.com/avatar/30656a03ae903df0e8d3802b9f73d2cb0f7269f2cc9a81e21f175ca1d19ef164?
     s=32&d=mm&r=g)
 2.   [Jeff de Wit](https://profiles.wordpress.org/cheffheid/)  10:51 am _on_ January
     15, 2015
 3.  Nice. I like it.
 4.  Most of the stuff I do at work is with Genesis, and I can definitely get some 
     patterns worked out for its hooksHooks In WordPress theme and development, hooks
     are functions that can be applied to an action or a Filter in WordPress. Actions
     are functions performed when a certain event occurs in WordPress. Filters allow
     you to modify certain functions. Arguments used to hook both filters and actions
     look the same. (skip link specifically).
 5.   * ![](https://secure.gravatar.com/avatar/c279d00cf8d7c55faab3acb6ee3a7f2eb5bb2e5e81aa73c143e627ca3902884e?
        s=32&d=mm&r=g)
      *  [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)  2:48 am
        _on_ January 22, 2015
      * I’ve got you down for a skip link in Genesis. Thank you! 🙂
 6.  ![](https://secure.gravatar.com/avatar/4fd344e387cd0febbb417ee2a2bef7db6b40c8f7ecf4265fb41dcef8e9fa8c4b?
     s=32&d=mm&r=g)
 7.   [Joe Dolson](https://profiles.wordpress.org/joedolson/)  4:06 pm _on_ January
     15, 2015
 8.  One pattern I’d like to see added is a form feedback pattern using AJAX and aria-
     live regions. This could be used for enabling a live search or doing instant feedback
     on submitting comments, and would be very valuable. (I can work on that, too.)
     Thanks for running with this, David!
 9.   * ![](https://secure.gravatar.com/avatar/c279d00cf8d7c55faab3acb6ee3a7f2eb5bb2e5e81aa73c143e627ca3902884e?
        s=32&d=mm&r=g)
      *  [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)  2:49 am
        _on_ January 22, 2015
      * I’ve got you down for a comment form with ARIA Live Regions. Thank you! 🙂
 10. Pingback: [WordPress Theme Pattern Library for Accessibility in Development | David A. Kennedy](http://davidakennedy.com/2015/01/15/wordpress-theme-pattern-library-for-accessibility-in-development/)
 11. ![](https://secure.gravatar.com/avatar/5612a0b1e26e958b7cb153ad8d69325be61525b2bba4819361bb69f127ec34b4?
     s=32&d=mm&r=g)
 12.  [MRWweb](https://profiles.wordpress.org/mrwweb/)  7:09 pm _on_ January 15, 2015
 13. This might be too big or too hard to write a universal pattern for due to varying
     theme file structures, but some type of theme heading structure pattern would 
     be awesome. I’m just not sure how it would look.
 14.  * ![](https://secure.gravatar.com/avatar/c279d00cf8d7c55faab3acb6ee3a7f2eb5bb2e5e81aa73c143e627ca3902884e?
        s=32&d=mm&r=g)
      *  [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)  3:00 am
        _on_ January 22, 2015
      * I do think this would be hard to do – simply because to really understand a
        theme’s heading structure, you need to see the whole theme. These would just
        be patterns – bits and pieces.
      * But this is a good idea, and perhaps we can beef up our recommendations in 
        the [theme accessibility requirements](https://make.wordpress.org/themes/handbook/review/accessibility/required/#headings).
        That might help. Thoughts, [@joedolson](https://profiles.wordpress.org/joedolson/)?
 15. ![](https://secure.gravatar.com/avatar/e2b4fcd1e1dc6fcac050b2d66c80e4d9fe07e52c1c2b15f30efa02cfe444ef7c?
     s=32&d=mm&r=g)
 16.  [Chrisdc1](https://profiles.wordpress.org/chrisdc1/)  12:51 pm _on_ January 16,
     2015
 17. Some themes have it already (especially the Twenty * series), but would a simple
     implementation of tabable drop down menus be useful? I’ve got a [pull request about this for _s](https://github.com/Automattic/_s/pull/540)
     that’s turned into a bit of a monster thread, but I could make something easy 
     to drop in for standard menus (with or without jQuery).
 18.  * ![](https://secure.gravatar.com/avatar/5612a0b1e26e958b7cb153ad8d69325be61525b2bba4819361bb69f127ec34b4?
        s=32&d=mm&r=g)
      *  [MRWweb](https://profiles.wordpress.org/mrwweb/)  5:12 pm _on_ January 16,
        2015
      * +1
      * ![](https://secure.gravatar.com/avatar/c279d00cf8d7c55faab3acb6ee3a7f2eb5bb2e5e81aa73c143e627ca3902884e?
        s=32&d=mm&r=g)
      *  [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)  3:02 am
        _on_ January 22, 2015
      * I think we can do both. I’ve got you down for at least one. 🙂 Maybe you tackle
        the vanilla JS one since you’ve worked on that for _s?
         - ![](https://secure.gravatar.com/avatar/e2b4fcd1e1dc6fcac050b2d66c80e4d9fe07e52c1c2b15f30efa02cfe444ef7c?
           s=32&d=mm&r=g)
         -  [Chrisdc1](https://profiles.wordpress.org/chrisdc1/)  11:56 pm _on_ January
           22, 2015
         - Sound good, I’ll work on vanilla js as you suggest.
 19. Pingback: [Weekly Roundup of Web Design and Development Resources: January 16, 2015](http://www.lireo.com/weekly-roundup-web-design-development-resources-january-16-2015/)
 20. ![](https://secure.gravatar.com/avatar/78aa0adc8327fc00f762e239f08b7dd6dc0a337c0caa72586a26c4c47aebaba5?
     s=32&d=mm&r=g)
 21.  [Andrew Woods](https://profiles.wordpress.org/awoods/)  9:47 pm _on_ January 
     16, 2015
 22. Someone else had a similar idea. I found this site a few months ago. [http://a11yproject.com/patterns/](http://a11yproject.com/patterns/)
 23.  * ![](https://secure.gravatar.com/avatar/c279d00cf8d7c55faab3acb6ee3a7f2eb5bb2e5e81aa73c143e627ca3902884e?
        s=32&d=mm&r=g)
      *  [David A. Kennedy](https://profiles.wordpress.org/davidakennedy/)  3:03 am
        _on_ January 22, 2015
      * I’ve seen these. They’re great, and could definitely serve as inspiration or
        something we can fork. Thanks for the suggestion!
 24. ![](https://secure.gravatar.com/avatar/6601fea5593bacaa9868b8335f7dcf5aaaf60cd856e15cc49d6d7e182ec702a9?
     s=32&d=mm&r=g)
 25.  [Tomas Mackevicius](https://profiles.wordpress.org/tomasm/)  4:11 am _on_ January
     19, 2015
 26. These are general HTMLHTML HTML is an acronym for Hyper Text Markup Language. 
     It is a markup language that is used in the development of web pages and websites./
     CSSCSS CSS is an acronym for cascading style sheets. This is what controls the
     design or look and feel of a site./JS patterns, we need patterns that are adapted
     for WP.
 27. ![](https://secure.gravatar.com/avatar/e3a3eab4b3c5018dbd30d88a0ff9f3305a1fd88ba058750298292aac4d3c7e23?
     s=32&d=mm&r=g)
 28.  [Tomas Mackevicius](https://profiles.wordpress.org/accessiblejoe/)  4:21 am _on_
     January 19, 2015
 29. It would be nice to have patterns to replace headings that are hard-coded in the
     WP coreCore Core is the set of software required to run WordPress. The Core Development
     Team builds WordPress.. (Ultimate solution would be create function options to
     make it easy to replace them)
 30. When you’re creating theme, you pick your document structure style (eg. one H1
     vs multiple H1, etc.). In some cases hard-coded headings will not be a good fit
     for the envisioned document structure like [in my example](http://blog.rrwd.nl/2014/11/21/html5-headings-in-wordpress-lets-fight/#comment-6984).
 31. In my case I’m looking for the function to replace H3 heading for the #reply-title.
     I found one, but I do not have very big experience to evaluate it if it is good,
     if it doesn’t have any security issues, etc.:
 32. [https://wordpress.stackexchange.com/questions/108536/how-do-we-remove-the-h3-tag-for-the-reply-title-i-d/168879#168879](https://wordpress.stackexchange.com/questions/108536/how-do-we-remove-the-h3-tag-for-the-reply-title-i-d/168879#168879)
 33. If anyone has solution, or could evaluate that function, we would have one snippet
     ready for the library 🙂
 34. ![](https://secure.gravatar.com/avatar/e3a3eab4b3c5018dbd30d88a0ff9f3305a1fd88ba058750298292aac4d3c7e23?
     s=32&d=mm&r=g)
 35.  [Joseph Karr O'Connor](https://profiles.wordpress.org/accessiblejoe/)  11:25 
     pm _on_ January 21, 2015
 36. Tomas Mackevicius: I approved your comment but my avatarAvatar An avatar is an
     image or illustration that specifically refers to a character that represents 
     an online user. It’s usually a square box that appears next to the user’s name.
     and id were attached to it. Regrets.

Comments are closed.

# Post navigation

[← Accessibility Ticket Priorities for WordPress 4.2](https://make.wordpress.org/accessibility/2015/01/07/accessibility-ticket-priorities-for-wordpress-4-2/)

[Better Support for Accessibility Issues →](https://make.wordpress.org/accessibility/2015/01/15/better-support-for-accessibility-issues/)