layout | title | description | categories | |
---|---|---|---|---|
post |
How-to: Future proof your accessibility efforts.
|
Ways to make your accessibility effort as future proof as possible. |
|
We're open to suggestions, especially international (Euro/UK) chains we are ignorant to. Just comment below! |
/* Application.js - | |
* This could be improved 10 fold but I'll upt it up on here anyway :) | |
* | |
* @require jQuery hashchange plugin by Ben Alman http://benalman.com/projects/jquery-hashchange-plugin | |
* | |
* @var errorTmpl - template for injected error message. | |
* @var errorHex - verbiage for invalid hex formatting (could be better). | |
* @var errorNull - verbiage for call with no results. | |
* | |
*/ |
<h1>Contact</h1> | |
<form action="#" method="post"> | |
<div> | |
<label for="name">Text Input:</label> | |
<input type="text" name="name" id="name" value="" tabindex="1" /> | |
</div> | |
<div> | |
<h4>Radio Button Choice</h4> | |
layout | title | description | categories | |
---|---|---|---|---|
post |
How-to: Future proof your accessibility efforts.
|
Ways to make your accessibility effort as future proof as possible. |
|
Summary: Use role="application"
very sparingly, if at all.
NEVER use role="application"
on a widely containing element such as <body>
if your page consists mostly of traditional widgets or page elements such as links that the user does not have to interact with in focus mode. Using role="application"
unnecessarily can cause huge headaches for any assistive technology user trying to use your site/application. Only put it on the <body>
element if your page consists solely of a widget or set of widgets that all need the focus mode[^focusmode] to be turned on.
Do Use
- Use if your page has no resemblance to a classic document in roughly over 90% of its content
- Use clear labels within your application
A common misconception among web developers is that screen readers only read the non-JavaScript page. Due to this misconception, we sometimes assume it's unnecessary to make JavaScript apps and other functionality accessible. This is categorically false.
According to a May 2012 survey conducted by WebAIM, 98.6% of screen reader users have JavaScript enabled.
Be sure to make efforts to ensure that the JavaScript functionality (apps, custom UI controls, forms, etc) within your site is accessible. It could be as simple as opting for native links and form inputs instead of custom scripted form elements.
Short answer: Don't use them, except in special circumstances.
HTML title
attributes are often perceived as an accessibility (and SEO) bonus, but the opposite is true. For screen reader users the content included inside of the title
attribute is typically unncessary, redundant, and possibly not even used. Conversely, content being put in the title
attribute is being hidden from the (probable) majority of your users. If information is being hidden from the majority of your users, then it's probably not necessary.
There are a few times when using a title
attribute is appropriate:
- For
<frame>
and<iframe>
elements - For providing a label when a text label would be redundant