Module 3 · Lesson 3 of 411/60 in the course~18 min
Module lessons (3/4)
Buttons vs Links, Keyboard Focus & ARIA
Lesson preview5 hands-on exercises readyModern HTML & CSS · Forms, Validation & Practical Accessibility
Use <button> for actions and <a> for navigation, preserve focusability, and apply concise ARIA attributes cleanly.
What you'll learn in this lesson
- Apply the golden rule: links (`
) navigate; buttons (<button>`) trigger actions. - Expose accessible names on icon-only buttons cleanly using
aria-label. - Understand keyboard
Tabfocus order,aria-liveannouncements, and First Rule of ARIA (prefer native HTML first).
Overview
Clicking an action like "Delete item" or "Open Menu" should never use <div onclick="..."> or ``:
Compare inaccessible fake <div> controls and missing alt tags against real native HTML elements in this live accessibility auditor:
Sections covered in this lesson
- 1Links Navigate, Buttons Act
- 2Explore Accessible Role & Keyboard Reachability Live
Pro Lesson · Forms, Validation & Practical Accessibility
Unlock "Buttons vs Links, Keyboard Focus & ARIA" and the full Modern HTML & CSS curriculum
Use <button> for actions and <a> for navigation, preserve focusability, and apply concise ARIA attributes cleanly.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Modern HTML & CSS plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.