3 ms·
Numerous accessibility issues here. Many of these examples can't be operated by a keyboard, for example. "CSS only" is not a virtue if it comes at the cost (as
by danielnixon 10y ago
Numerous accessibility issues here. Many of these examples can't be operated by a keyboard, for example. "CSS only" is not a virtue if it comes at the cost (as it always does) of needlessly excluding people from the web.
- grahamel 10y agoWas about to write the same. The three examples I clicked on - tabs, accordion, and menu - didn't work via keyboard. All of these are fairly simple show and hide interactions that are easier to use, build and maintain when done with javascript, with all the content shown if JS is turned off, not fully loaded or broken.
- extra88 10y agoThe 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".
- deleted 10y ago[deleted]
- CaptSpify 10y agoIt's funny to hear this argument. I constantly hear "well, we don't worry about non-js browsers, because they are such a small minority". Yet how many people are keyboard-only users? I'm not saying your wrong, or that you are arguing against non-js browsers, just a funny twist.
- ceejayoz 10y agoUsers disabling JS can opt to turn it on. Blind users can't opt to see.