Skip to main content
HTML Code Completion Hard +35 XP

ARIA Role

Complete the ARIA role for a dialog.

HTMLFill in the blank
<div ___="dialog" aria-modal="true">
  <h2>Confirm Action</h2>
</div>

Type the missing code

Show answer and explanation

Answer: role

role='dialog' identifies the element as a dialog to assistive technologies, enabling proper keyboard navigation.

Hint: Which attribute assigns semantic roles?

What this challenge tests

Code Completion in HTML: aria, accessibility.

Related challenges