3 ms·
The accordion can work via keyboard with some styling changes, e.g. position or clip checkbox instead of display:none, add visual indication on :focus. I didn't
by extra88 10y ago
The accordion can work via keyboard with some styling changes, e.g. position or clip checkbox instead of display:none, add visual indication on :focus. I didn't check the others but their accessibility may be similarly correctible.
Of course for accordion in particular it would be better if the pure HTML solution of using <details> and <summary> elements was supported in all browsers. They're already in Chrome and Safari and will come out from behind a flag in the next Firefox version. A polyfill for IE etc. can bridge the gap.
- grahamel 10y agoTrue, yet when examples like these are added without basic keyboard accessibility in mind they can get added to projects in the same half finished state. How many sites using Meyer's reset didn't add focus styles to links? Even with the comment /* remember to define focus styles! */ It's not the fault of the original developer but it certainly helps to have more robust examples.
- danielnixon 10y agoAs one counter example: you'll never make a modal popup accessible without JavaScript. The focus management required is impossible with "CSS only".