mattmcleod
Forum Replies Created
-
Forum: Plugins
In reply to: [Collapse-O-Matic] Keyboard accessibility – fix enclosedMore small changes, this time to the CSS. 🙂
The basic gist is that you don’t want to imply functionality that isn’t there, so if the page is loaded with Javascript off then you don’t for example want the cursor set to “pointer” or for that matter to have the arrow.
The simplest way I can see to achieve this is to change the .collapseomatic class so that it reads thus:
html.js .collapseomatic { background-image: url(images/arrow-down.png); background-repeat: no-repeat; cursor: pointer; } .collapseomatic { padding: 0 0 10px 16px; }Though this does introduce a dependency on Modernizr so, hrm, not sure.
Forum: Plugins
In reply to: [Collapse-O-Matic] Keyboard accessibility – fix enclosedThanks, 1.6.4b is doing the right thing, provided I set tabindex=”0″ on each expand shortcode — the default setting isn’t saving at present.
I’d recommend making the default 0 rather than empty as that’ll make all (updated) installations of the plugin keyboard-accessible by default.
The remaining issue is how to tell a screen reader that this is an expand/collapse feature. Here’s the WAI ARIA guidance on that:
http://www.w3.org/TR/wai-aria-practices/#accordion
(I work for a web accessibility consultancy, so if you have any questions feel free to ask.)
Forum: Plugins
In reply to: [Collapse-O-Matic] Keyboard accessibility – fix enclosedAs a general rule you don’t want to set tabindex to anything other than 0 or -1 unless there’s a very good reason. Setting it to 0 will automatically add it to the natural tab focus order which is usually what you want — tab focus order should follow visual order.
Forum: Plugins
In reply to: [Collapse-O-Matic] Keyboard accessibility – fix enclosedIt should probably have some ARIA roles defined too, I’ll look at that tomorrow my time and let you know.
(I’ll do some diffs and put them online somewhere you can grab ’em.)