Bird
0
0

Which ARIA attribute is correctly used in this Angular template snippet?

easy📝 Syntax Q12 of 15
Angular - Internationalization and Accessibility
Which ARIA attribute is correctly used in this Angular template snippet?
<button aria-label="Close menu">X</button>
Aaria-hidden="Close menu"
Baria-label="Close menu"
Caria-checked="Close menu"
Daria-live="Close menu"
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct ARIA attribute for labeling

    The attribute aria-label provides an accessible name for elements like buttons.
  2. Step 2: Check each option's meaning

    aria-hidden hides content, aria-checked is for checkboxes, aria-live is for dynamic updates. Only aria-label fits the usage.
  3. Final Answer:

    aria-label="Close menu" -> Option B
  4. Quick Check:

    aria-label names elements for screen readers [OK]
Quick Trick: Use aria-label to name buttons for screen readers [OK]
Common Mistakes:
  • Using aria-hidden to label elements
  • Confusing aria-checked with aria-label
  • Applying aria-live incorrectly on static buttons

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes