Re:Show HN: Mimicking the Bloomberg menu widget without Java...
by nebulous1 on Tuesday June 26, 2018 @10:40AM
(#17400913)
css is often the slowest part of a webapp. complex css like this is not necessarily better accessibility-wise than javascipt
Re:Show HN: Mimicking the Bloomberg menu widget without Java...
by Grumbledour on Tuesday June 26, 2018 @10:56AM
(#17401049)
Why complex? Sure, this example is somewhat complex, but it does not need to be. Structure the menu in nested ul's, add simple hover css and don't use "display: none;" but rather "position: absolute; left: -999em;" and you get simple css and a good html structure that a screen reader for example can read easily and which also is clear to read if you turn css off entirely.
Of course, small hover menus offer their own accessibility challenges, but they don't depend on the way they are implemented but rather the choice of UX. And no reason why you could not improve this simple css menu with some js to make it more user friendly (like turning hover into clicks etc.)
I can only encourage everyone that thinks js is the catch-all solution to dive a bit deeper into html&css and try out alternate solutions. It's worth it for the knowledge gain in itself but offers many other benefits.