Accessibility · Middle · Question 30 of 75
Which attributes does a custom modal need?
- 1
role="main",aria-hidden="true"andaria-current - 2
role="alert",aria-liveand a positivetabindexvalue - 3
role="dialog",aria-modal="true"and an accessible name
Show the answer
Correct answer: role="dialog", aria-modal="true" and an accessible name
Explanation
aria-labelledby usually points to the title. Native <dialog> with showModal() handles most of the rest for you.