Element.ariaHasPopup is an instance property that reflects the aria-haspopup attribute. Learn tokens like listbox, menu, and dialog, how they describe popup availability, and how to get or set the property from JavaScript—with five examples and try-it labs.
01
Kind
Instance property
02
Type
String
03
Values
false · true · menu · …
04
Reflects
aria-haspopup
05
Status
Baseline widely
06
Pairs with
ariaExpanded
Fundamentals
Introduction
Some controls open a popup: a menu, a listbox, a dialog, and more. Assistive technologies need to know that a popup is available and what kind it is.
aria-haspopup carries that signal. ariaHasPopup is the JavaScript reflection of that attribute.
JavaScript
const el = document.getElementById("animal");
console.log(el.ariaHasPopup); // "true"
el.ariaHasPopup = "listbox";
💡
Beginner tip
Prefer the most specific token that matches the popup. For a combobox that opens a listbox, use "listbox" (MDN) rather than a generic "true". Pair with ariaExpanded for open/closed state.
Concept
Understanding the Property
MDN: the ariaHasPopup property of the Element interface reflects the value of the aria-haspopup attribute, which indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Reflected attribute — mirrors aria-haspopup.
Get / set — readable and writable string.
Several tokens — false, true, menu, listbox, tree, grid, dialog.
Baseline — widely available since October 2023 (MDN).
Foundation
📝 Syntax
JavaScript
ariaHasPopup
Value
A string with one of the following values:
Value
Meaning (MDN)
"false"
The element does not have a popup.
"true"
The element has a popup that is a menu.
"menu"
The element has a popup that is a menu.
"listbox"
The element has a popup that is a listbox.
"tree"
The element has a popup that is a tree.
"grid"
The element has a popup that is a grid.
"dialog"
The element has a popup that is a dialog.
⚠️
Support warning (MDN)
Support for different aria-haspopup values can vary by element. Follow the ARIA specification for your pattern and test with browsers and assistive technologies.
Pattern
📋 Combobox (MDN Shape)
MDN starts with aria-haspopup="true" on a combobox, then updates to "listbox"—the expected value when the popup is a listbox:
Element.ariaHasPopup is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline Widely available
Element.ariaHasPopup
String false / true / menu / listbox / tree / grid / dialog — reflects aria-haspopup.
BaselineWidely available
Google ChromeSupported (ARIA reflection)
Yes
Microsoft EdgeSupported (ARIA reflection)
Yes
Mozilla FirefoxSupported (ARIA reflection)
Yes
Apple SafariSupported (ARIA reflection)
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNo ariaHasPopup IDL — use setAttribute
No
ariaHasPopupBaseline
Bottom line: Use ariaHasPopup to declare popup availability and type. Prefer specific tokens. Pair with ariaExpanded for open/closed state, and test your widget pattern with AT.
Wrap Up
Conclusion
ariaHasPopup reflects aria-haspopup so controls can advertise which kind of popup they trigger. Prefer specific tokens like listbox and menu, keep ariaExpanded in sync for open/closed state, and test with assistive technologies.
Assume every value works identically on every element (MDN)
Forget an accessible name on the trigger
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaHasPopup
Reflected aria-haspopup string for popup availability and type.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
Many tokens
listbox menu dialog…
Values
🔍03
Be specific
prefer over true
Rule
✅04
Baseline
widely available
Status
🎯05
ariaExpanded
open / closed
Pair
❓ Frequently Asked Questions
It reflects the aria-haspopup attribute as a string, indicating the availability and type of interactive popup (menu, listbox, dialog, and so on) that can be triggered by the element.
No. MDN marks Element.ariaHasPopup as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
The strings "false", "true", "menu", "listbox", "tree", "grid", or "dialog". Prefer the specific type that matches the popup (for example "listbox" for a combobox).
"true" means the element has a popup that is a menu (same idea as "menu"). Prefer the more specific token when you can.
ariaHasPopup describes the kind of popup available. ariaExpanded says whether that popup is currently open or closed.
Yes. Reading and writing ariaHasPopup updates the reflected aria-haspopup attribute. Test with browsers and assistive technologies for your widget pattern.
Did you know?
Historically many examples used aria-haspopup="true" for menus. Modern guidance prefers naming the popup type explicitly—MDN’s combobox demo updates true to listbox for that reason.