Hacker News new | ask | show | jobs
by jnbiche 3805 days ago
If you use proper semantic HTML, ARIA attributes are rarely needed. It's a good idea to validate nonetheless, but there's no point in writing:

    <button role="button">Sign in</button>
or

    <h1 role="heading">Heading</h1>
I can think of only a handful of aria attributes that would be helpful if you use proper HTML, such as `search`, maybe `toolbar` and a few others.

But it's good to validate the markup regardless, to be sure.

2 comments

Besides, all the ARIA stuff isn't free. It only benefits screen readers and bots that aren't Google's. The rejection from lack of accessibility is as strange as rejection from lack of functionality in IE 8 or less (which has perhaps 2-4x as much market share as that of all screen readers). For any website or webapp you should know your market and make the call whether you need to spend time upfront, burn the time now, or delay indefinitely or forever, on supporting these low market share alternatives.
Posts like this give me the sads. Equating disabled users with a browser that has been EOLed? Wow, just wow. Also aside from being the right thing to do, depending on who you are and where you are, it may be the law...

https://en.m.wikipedia.org/wiki/National_Federation_of_the_B....

Styleable versions of components that aren't natively styleable (<option>, checkbox <input>, radio <input>) are another example of where ARIA attributes are helpful. jQuery's Menu demonstrates this: https://jqueryui.com/menu/ (Inspect the DOM)