Interview Question

What is ARIA and when to use it?

Use ARIA only when native HTML is not enough.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

ARIA is extra accessibility information for user-interface controls. • Use it when native HTML does not provide the needed meaning. • Prefer a real `<button>` over a `<div role="button">`. • Keep ARIA states updated when the interface changes.

💡 Simple Example

<button aria-controls="menu" aria-expanded="false">Open menu</button>

⚡ Quick Revision

Use ARIA only when native HTML is not enough.