Difference between revisions of "ARIA Haspopup property"
(Correction: this is not a text input, it's a color input) |
(Color input only supported some browsers) |
||
Line 15: | Line 15: | ||
</head> | </head> | ||
<body> | <body> | ||
− | <p>Input type color</p> | + | <p>Input type color (browser support varies)</p> |
<div> | <div> | ||
<label for="i1">Colors:</label> | <label for="i1">Colors:</label> |
Revision as of 06:41, 10 October 2017
This page demonstrates uses of the aria-haspopup
attribute.
- Tooltips are not considered popups under ARIA
Please note: According to the current ARIA 1.0 specification the aria-haspopup
attribute should only be used to indicate the presence of a menu, submenu, or button menu. Under ARIA 1.1 the aria-haspopup
attribute should not be used to indicate when a dialog or modal window will open. These are potential good uses for the attribute and are addressed by future versions of the ARIA specification. Currently screen readers such as JAWS and NVDA will announce "menu", "sub menu", or "haspopup" for the different uses of this attribute.
Note: The controls below have the attribute set to "true" but do not actually have a menu associated with them. Thus, nothing will happen when you interact with the control.
Input type color (browser support varies)
Input type button
Button element
Link
Span with role of button
Radio button
Contents
ARIA 1.1 values for the aria-haspopup property
Values under 1.1 are:
- menu
- listbox
- tree
- grid
- dialog
- "true" is supported for backward compatibility and maps to "menu"
Buttons with varies haspopup values
Links with varies haspopup values
Radio buttons with various haspopup values
Input with various haspopup values
Button with aria-expanded
A widget can appear as a popup, while the button that triggered the popup remains interactive and hides the popup. (Experimental)
Assistive Technology
- iOS 10.3.3 and VoiceOver
- ARIA 1.0 "true": Announced as "shows popup"
- ARIA 1.1 values: Not announced. No pop-up indication provided at all.
- ARIA 1.0 "true" and aria-expanded: Announced as "shows popup". The aria-expanded state is not announced.
- ARIA 1.1 values and aria-expanded: Pop-up values are not announced. The aria-expanded state is announced as "expanded" or "collapsed".
- JAWS 18 (tested with Firefox 56.0 and Internet Explorer 11)
- On links: Announces appropriate popup value like "listbox", "grid", etc.
- On radio buttons: Announces appropriate popup value like "listbox", "grid", etc.
- On buttons: Announces "menu", regardless of haspopup value
- Exception: If the button also has an aria-expanded attribute, in JAWS + Internet Explorer (not Firefox), when not in forms mode, it announces both "menu" and the appropriate popup value. Example: "menu [collapsed|expanded] haspopup dialog".
- On text inputs: Announces "has popup", regardless of haspopup value
- On other element types: Announces "has popup", regardless of haspopup value
- NVDA 2017.3 + Firefox 56.0
- On buttons
- With haspopup "true": Announces "menu button submenu"
- With ARIA 1.1 values: Announces "button submenu"
- With aria-expanded: Same announcements, plus inserting the appropriate value of [collapsed|expanded]
- On text inputs
- In forms mode: Announces "edit with autocomplete submenu"
- Not in forms mode: Announces "edit submenu"
- On other element types: Announces "submenu"
- On buttons
JAWS 18 support (Firefox 56.0 and Internet Explorer 11)
This is the same information as above, in a table format.
Button | Input text | Input radio | Link | |
---|---|---|---|---|
aria-haspopup="true" | menu | haspopup | haspopup | haspopup |
aria-haspopup="menu" | menu | haspopup | has pop up menu | has pop up menu |
aria-haspopup="listbox" | menu | haspopup | has pop up listbox | has pop up listbox |
aria-haspopup="tree" | menu | haspopup | has pop up tree | has pop up tree |
aria-haspopup="grid" | menu | haspopup | has pop up grid | has pop up grid |
aria-haspopup="dialog" | menu | haspopup | has pop up dialog | has pop up dialog |