a11yTips — Use ARIA to expose the role of custom user…

Use ARIA to expose the role of custom user interface components

no. 131

Make sure custom user interface controls’ roles are identified using ARIA roles

Authors today often use DIV and SPAN elements to create custom controls, rather than use the predefined HTML elements. For example, instead of relying on regular checkboxes, authors might design fake checkboxes using images and will use DIV elements, some CSS and a little JavaScript to turn them into what looks like checkboxes. These custom controls often look really cool, until users try to access them with anything but a mouse. When they do, they quickly realize that these cool looking checkboxes don’t quite behave like checkboxes. Sometimes, hitting the space bar won’t check them. Sometimes they won’t be part of the tabbing order. Whatever the reason may be, they’re just broken. This is because authors often forget to factor in these controls’ default behaviours. To make custom controls accessible, authors need to also expose the role of these custom user interface components.

To do so, simply make sure that whenever custom controls are created, that the proper ARIA role is added to it. WAI-ARIA provides a number of widget roles meant to convey the expected semantics to [...]

Read article at dboudreau.tumblr.com

Article Taxonomies

Categories:
Fatal error: Uncaught Error: Object of class WP_Error could not be converted to string in /home/webable/www/www/wp-content/themes/webable/content-mcm.php:65 Stack trace: #0 /home/webable/www/www/wp-includes/template.php(812): require() #1 /home/webable/www/www/wp-includes/template.php(745): load_template('/home/webable/w...', false, Array) #2 /home/webable/www/www/wp-includes/general-template.php(206): locate_template(Array, true, false, Array) #3 /home/webable/www/www/wp-content/themes/webable/single-mcm_article.php(15): get_template_part('content-mcm') #4 /home/webable/www/www/wp-includes/template-loader.php(106): include('/home/webable/w...') #5 /home/webable/www/www/wp-blog-header.php(19): require_once('/home/webable/w...') #6 /home/webable/www/www/index.php(17): require('/home/webable/w...') #7 {main} thrown in /home/webable/www/www/wp-content/themes/webable/content-mcm.php on line 65