Testing · Middle · Question 31 of 75
What does toHaveAccessibleName check?
- ✓Correct answer: The name assistive technologies announce, computed from text, label,
aria-labeloraria-labelledby - 2The
nameattribute of an input - 3The component's displayName
Explanation
Useful for icon buttons: <button aria-label="Close">×</button> must be announced as “Close”.