ARIA States & Properties
aria-haspopup
Identifies the availability and type of interactive popup. True is equivalent to menu, not a generic yes value for every popup. Match the popup's actual role and implement its interaction and focus behavior separately. Value type: token. Accepted values: false, true, menu, listbox, tree, grid, dialog. Default or omitted behavior: false. Applicable context: global where allowed; combobox has implicit listbox popup unless overridden. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.
Formal Syntax & Structure
html syntaxhtml
aria-haspopup="dialog"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| aria-haspopup | token | Accepted values: false, true, menu, listbox, tree, grid, dialog. Default or omitted behavior: false. Context: global where allowed; combobox has implicit listbox popup unless overridden. Requiredness depends on the role. |
Working Example
Example Snippethtml
<button aria-haspopup="dialog" id="launch">Settings</button><dialog id="settings" aria-label="Settings"> <form method="dialog"> <button>Close</button> </form></dialog><script> document.getElementById('launch').onclick=()=>document.getElementById('settings').showModal()</script>