Accessibility: what can aria-haspopup be used for?

Officially it should be used only for menus or sub-menus, from the ARIA spec 1.0:

Indicates that the element has a popup context menu or sub-level menu.

The Whatsock style guide covers this under the ‘modals’ section:

It might sound like a good idea to notify screen reader users that a ‘Popup’ is attached by adding the attribute aria-haspopup=”true” to the triggering element, but this is not a good idea.
… In short, don’t use aria-haspopup unless you are triggering a menu.

There is some discussion about expanding the meaning in future revisions, but for the moment assume it is for menus.

I gave an answer about Bootstrap’s tooltips which should help.

For pop-up browser windows, those are announced by screen readers anyway, no extra markup is needed. (NB: It helps to include a visual indicator of a new window for screen magnifier users.)

Leave a Comment

tech