Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should aria-haspopup allow tooltip as a supported token value? #1122

Closed
accdc opened this issue Nov 26, 2019 · 5 comments
Closed

Should aria-haspopup allow tooltip as a supported token value? #1122

accdc opened this issue Nov 26, 2019 · 5 comments

Comments

@accdc
Copy link
Contributor

accdc commented Nov 26, 2019

The following is stated within the ARIA spec for aria-haspopup,
https://www.w3.org/TR/wai-aria-1.2/#aria-haspopup

"A tooltip is not considered to be a popup in this context."

I was asked recently though, why can't aria-haspopup="tooltip" be used to convey when an element has an attached ARIA tooltip?

Besides saying it's not supported, I can't think of a valid reason why not. Many times I've run across active elements that have attached tooltips, and nothing is conveyed to non-sighted screen reader users to convey this.

So, I'm filing this to raise the question: Why should tooltip not be allowed as a supported token value for aria-haspopup?

@scottaohara
Copy link
Member

and nothing is conveyed to non-sighted screen reader users to convey this

wouldn't that mean that the developers have not properly associated the tooltip content with the invoking element with aria-describedby?

From the tooltip definition:

Authors SHOULD ensure that elements with the role tooltip are referenced through the use of aria-describedby before or at the time the tooltip is displayed.

That said, I think this could well be discussed in regards to existing issues #979 (clarify the use of role=tooltip, since aria-describedby is really the attribute doing all the work here and the tooltip role is kinda pointless right now) and #1024, (clarify the usage of aria-haspopup).

But per the immediate question of a valid reason why not, I'd point to the text I quoted from the tooltip's definition.

@smhigley
Copy link
Contributor

I can think of two reasons off the top of my head why this might be confusing or not work in practice:

  1. aria-haspopup currently points to popups that appear when the user performs an action on the control. Usually the primary action (in the case of buttons), or the typing/alt+down arrow for inputs. Tooltips appear on hover or focus, and are generally not interactive. Assuming the tooltip text is still associated with the control through aria-describedby, it is unclear what additional information the user would gain through aria-haspopup, and what action they would be able to do based on the existence of a tooltip popup being communicated.

  2. We would then need to deal with multiple tokens in aria-haspopup values, since there's no reason a combobox or button w/ popup couldn't also have a tooltip

@accdc
Copy link
Contributor Author

accdc commented Nov 27, 2019

The points that Sarah raised seem most valid to me, since I could have a tab that opens an ARIA Menu, like this one
http://whatsock.com/tsg/Coding%20Arena/ARIA%20Menus/Variation%20ARIA%20Tabs%20With%20Right%20Click/demo.htm

Or even role=textbox, like this one
http://whatsock.com/tsg/Coding%20Arena/ARIA%20Menus/Variation%20Simulated%20Edit%20With%20Right%20Click/demo.htm

And I could also add a tooltip that hovers near the tab or textbox when it receives focus or onmouseover, and it would be impossible to convey everything using aria-haspopup.

It seems like this would cause too many conflicts to be viable.

@jnurthen
Copy link
Member

@accdc do you want to close this?

@accdc
Copy link
Contributor Author

accdc commented Nov 27, 2019

Thanks, will do.

@accdc accdc closed this as completed Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants