Intermediate Topic 25 of 51 Web Development
ARIA
Attributes enhancing accessibility semantics.
How it works
Accessible Rich Internet Applications attributes add semantics to markup so assistive technologies understand custom widgets. They include roles such as dialog, tablist and alert, states and properties such as aria-expanded, aria-checked, aria-hidden and aria-live, and labeling attributes such as aria-label and aria-labelledby. ARIA changes only the accessibility tree, not behavior: you must still implement keyboard handling and focus management.
Step-by-step walkthrough
- A custom div acts as a menu or tab.
- ARIA adds roles, states and labels such as aria-expanded.
- The browser exposes them in the accessibility tree.
- A screen reader announces them.
- Use native elements first, ARIA only when needed.
Where it is used
Custom components like tabs, menus, comboboxes, modals and live-updating regions use ARIA to communicate structure and changes to screen readers.
Common pitfall
The first rule of ARIA is not to use it if a native HTML element already does the job, such as a button. Wrong or conflicting ARIA is worse than none, and aria-hidden on focusable elements traps users. Roles require supporting keyboard interactions defined in the ARIA Authoring Practices. Test with real screen readers and keep states in sync with the interface.
Where it fits in the course
ARIA is topic 25 of 51 in Web Development, rated Intermediate. It follows Web Accessibility. The next topic is Single Page Applications.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Web Development quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Web Development quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is ARIA?
Where do people use ARIA?
What is the most common mistake with ARIA?
What should I learn before this topic?
How can I practice it?
Is ARIA hard to learn?
How long does it take to learn ARIA?
Which topics are related to ARIA?
What should I study after ARIA?
Related topics
- Web Accessibility (Web Development)
- Single Page Applications (Web Development)
- CSS Animations (Web Development)
- React Fundamentals (Web Development)