3 ms·
I’ve been doing more accessible work and it’s a mess. Like oh you NEED to use JavaScript to make a pure css drop down menu accessible. Instead of putting the b
by dawnerd 6y ago
I’ve been doing more accessible work and it’s a mess. Like oh you NEED to use JavaScript to make a pure css drop down menu accessible.
Instead of putting the burden on web devs to create hacks around screen readers, how about the consumption software get better? There’s no reason it can’t detect a
:hover and treat that as a JavaScript event flipping an aria tag.
- nemo44x 6y agoDon’t the principles of progressive enhancement solve this? Build your site so that it can be used without js, etc and enhance features when you can detect the user is capable. Any type of menu should be able to display without scripting.
- dawnerd 6y agoThat’s exactly why I like using pure css when I can. Using JavaScript just to support aria tags is really backwards
- iudqnolq 6y agoThat's a massive hack that also won't work on mobile. Don't try and make real websites with real consequences if they fail like that. Either write websites that don't have the pretense of being fancy and don't use javascript (ie, your menu is just an always visible list of links) or use some javascript. Edit: I regret how rude this comment is.
- dawnerd 6y agoMobile has a flat menu, but thanks for assuming?
- dang 6y agoPlease don't respond with swipes, even if another comment was provocative or you feel it was. There's good information in your comments, but curious conversation (which is the goal here) also depends on how people conduct themselves. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- dang 6y agoCan you please argue a little more respectfully? Comments like this and leading with "Wrong" (https://news.ycombinator.com/item?id=26762908 https://news.ycombinator.com/item?id=26762908) have sharp elbows and evoke worse from others. There's good information in your comments, but curious conversation (which is the goal here) also depends on how people conduct themselves. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html.
- iudqnolq 6y agoI apologize, thanks for correcting me.
- dang 6y agoAppreciated!
- kiwijamo 6y agoIt was a blunt comment but I did not find it disrespectful. Sometimes it is necessary not to beat around the bush as non-disabled people tend to do when dealing with topics to do with disability or accessibility.
- extra88 6y agoIf you can display something on :hover, you can also display it on :focus (and/or :focus-within). Pure CSS dropdown is more of an issue for touchscreen use; touchscreen-only users are not limited to smaller mobile devices. Please don't make a megamenu using CSS alone; for any keyboard-only user, sighted or blind, that's too many links to Tab through.