TLDR Design · MISCELLANEOUS

I LEARNED THE FIRST RULE OF ARIA THE HARD WAY

css-tricks.com6 min read

Summary from the TLDR Design newsletter

A developer added role="link" to a button element, intending to style it differently, which broke keyboard activation and caused screen readers to announce conflicting roles, even though it passed automated accessibility tests. Removing the ARIA attribute and using a CSS class instead restored proper functionality, demonstrating that semantic HTML elements already provide necessary accessibility features. ARIA should only supplement native elements to convey dynamic states, such as aria-expanded, rather than override their inherent roles and behaviors.