神刀安全网

WordPress plugins and accessibility

WordPress recently announced that “all new or updated code released into WordPress core and bundled themes must conform with the WCAG 2.0 guidelines at level AA.” This means WordPress will be making the product more accessible with every new update. Rian Rietveld ‘s article  WordPress goes WCAG clearly reflects her enthusiasm about this step forward in terms of accessibility.

It aligns with Morten Rand Hendriksen ‘s statement during the State of Word 2015 (at 1:12:04 to be precise). We shouldn’t just focus on “ study Javascript deeply” but also on “study accessibility deeply”.

For us plugin developers, Rian makes a clear statement: “The accessibility of plugins is the responsibility of each plugin author.” In our book, that means you can’t just ignore accessibility altogether, because you don’t like to focus on it. In this post, I’d like to illustrate what this responsibility means to us.

WordPress plugins and accessibility

Write clean code

I’m not a code writer myself but have seen my share of plugin code over the last several years. Some are well coded, some are ‘poor’ coded. And by poor, I mean that some drawings by two-year-old kids have more structure than the code of those plugins. Write clean code, it’s as simple as that. It will make sure screen readers and tools like that will do a better job. It will make a site more accessible.

At Yoast, we don’t take this lightly. We have a well-thought-out code design and development process, which contains a lot of feedback moments. That feedback comes from colleagues and for instance from beta testers. It’s our and your responsibility as a plugin developer to make sure you’re not just outputting code. You have to make sure that you’re outputting clean code.

Use (free) accessibility tools

Running your code through the W3C Validator every once in a while already helps you determine if you’re writing clean code. Usually, the recommendations this validator gives you, are easy to fix. And they might already make a huge difference in term of accessibility.

Another great and very easy-to-use tool is WAVE . Simply install the chrome extension and see for yourself:

WordPress plugins and accessibility

The WAVE extension analyses a variety of possible accessibility issues. In the screenshot above, you can see things like missing ALT attributes and contrast issues. And how about adding these labels to your forms? It’s all not that hard. This WAVE analysis is all done in seconds and really tells you where your code (or website) should be improved for accessibility.

Contrast is also something that’s really easy to test and improve. Simply use WAVE or Lea Verou’s contrast ratio tool . No need to do that on a live website, as we’re talking about your plugin’s user interface here. Please go read my post  Easy-to-use accessibility tools for more testing tools.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » WordPress plugins and accessibility

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮