I Learned The First Rule of ARIA the Hard Way

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A developer shares their experience of breaking a button's accessibility by adding an ARIA role attribute. The button worked perfectly as native HTML, but adding role="link" caused keyboard navigation and screen reader issues. The fix was simple: remove the ARIA attribute and use CSS classes for styling instead. The key lesson is that semantic HTML already provides robust accessibility features, and ARIA should only be used to communicate missing state information, not to redefine element roles. When you override native semantics with ARIA, you take on responsibility for keyboard interactions, focus management, and cross-platform behavior.

7m read timeFrom css-tricks.com
Post cover image
Table of contents
1: Start with the simplest possible markup2: Observe the native behavior before adding anything3: Add well‑intentioned ARIA4: Back to semanticsWhy this keeps happeningA rule I now followWhere ARIA does belongLet the platform work for you
12 Comments

Sort: