3 ms·
yeah, "A focusable div with a button role" should be pretty accessible compared to a div with onclick event and neither of those things, for example.
by riffraff 5y ago
yeah, "A focusable div with a button role" should be pretty accessible compared to a div with onclick event and neither of those things, for example.
- extra88 5y agoIt is not sufficiently accessible because it still won't activate on Space Bar or Enter/Return keydown events. "Accessible" does not only mean "screen reader users can use it."
- riffraff 5y agomy point is that it's better then a div without those attributes. Switching markup completely is a larger effort than adding tabindex and role and the latter still provides a benefit.