Bird
0
0

What does the ARIA attribute aria-label do in an Angular template?

easy📝 Conceptual Q1 of 15
Angular - Internationalization and Accessibility
What does the ARIA attribute aria-label do in an Angular template?
AChanges the color of the element
BProvides a text label for screen readers when no visible label exists
CAdds a tooltip on hover
DMakes the element clickable
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of aria-label

    The aria-label attribute gives an accessible name to elements that might not have visible text labels.

  2. Step 2: Match the attribute's function to the options

    Only Provides a text label for screen readers when no visible label exists correctly describes this purpose, while others describe unrelated behaviors.

  3. Final Answer:

    Provides a text label for screen readers when no visible label exists -> Option B
  4. Quick Check:

    ARIA attribute aria-label = Provides accessible label [OK]
Quick Trick: Use aria-label to name unlabeled elements for screen readers [OK]
Common Mistakes:
  • Confusing aria-label with visual styling
  • Thinking aria-label adds tooltips
  • Assuming aria-label makes elements interactive

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes