4 ms·
> Everything that a semantic tag can do, the role attribute can do, too. <button> does far more than <div role=button> can do. Even if you meant to only refer
by extra88 4y ago
> Everything that a semantic tag can do, the role attribute can do, too.
<button> does far more than <div role=button> can do.
Even if you meant to only refer to landmark roles, why write <div role=main> or <div role=region> when you can write <main> and <section>?
As someone else pointed out, Reader modes don’t recognize roles and user stylesheets don’t either.