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

Tooltip role should allow referencing by aria-labelledby #987

Closed
carmacleod opened this issue May 29, 2019 · 8 comments
Closed

Tooltip role should allow referencing by aria-labelledby #987

carmacleod opened this issue May 29, 2019 · 8 comments
Assignees
Milestone

Comments

@carmacleod
Copy link
Contributor

@carmacleod carmacleod commented May 29, 2019

Currently, the tooltip role says:

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.

This doesn't allow for labelling icon buttons in a toolbar.
We should allow aria-labelledby as well as aria-describedby.

@carmacleod

This comment has been minimized.

Copy link
Contributor Author

@carmacleod carmacleod commented May 29, 2019

Relevant APG issues, example, and PR:

@jnurthen jnurthen added this to the ARIA 1.2 milestone May 30, 2019
@carmacleod carmacleod self-assigned this May 30, 2019
@scottaohara

This comment has been minimized.

Copy link
Member

@scottaohara scottaohara commented May 30, 2019

I think this is related to #979 which warrants a further discussion, but that's not slated until 1.3 but this one is 1.2?

I think making this sort of change just further muddies what a tooltip is and doesn't help clarify why the role is even useful (on the web).

@carmacleod

This comment has been minimized.

Copy link
Contributor Author

@carmacleod carmacleod commented May 30, 2019

Thanks for the reminder about #979, @scottaohara. I've moved it to 1.2 (@jnurthen I hope that's ok).
I will definitely keep it in mind when trying to clarify whether to choose aria-describedby or aria-labelledby when referencing a tooltip.

I think w3c/aria-practices#1014 is related as well.

This current issue (allow aria-labelledby) came up because someone submitted an APG PR for the toolbar example that added title to the tool items. We had to reject the PR because title (as you know) has accessibility problems. However, we were very sad to reject a PR from a new contributor, and welcome any changes they could make that would work. Tooltips on tool items have been around forever, and aria-labelledby of course works beautifully on icon buttons, even if the referenced element is hidden. But since the spec said to use aria-describedby for tooltips and made no mention of aria-labelledby, I opened this issue so that the PR could be resubmitted with valid and accessible code.

@scottaohara

This comment has been minimized.

Copy link
Member

@scottaohara scottaohara commented May 30, 2019

this is why i think #979 needs to be hashed out prior to work like this though. As the current definition states "A contextual popup that displays a description for an element."

displaying the accessible name isn't its description, and can be currently done without necessitating a tooltip role. quick n' dirty example.

i mean, the tooltip role isn't even necessary to provide the accessible description to the element... only in testing Narrator with current Edge was the role even announced, after I navigated away from the invoking element and to the revealed tooltip itself. Which, doesn't seem particularly useful to me... navigating to an element and having its accessible name exposed, and then attempting to navigate away but encountering the accessible name again.

@mcking65

This comment has been minimized.

Copy link
Contributor

@mcking65 mcking65 commented Jun 1, 2019

Strictly speaking, this is an author should, not a must, so our PR that uses aria-labelledby is not necessarily dependent on this issue. That said, I agree with Scott that this further muddies the waters.

@carmacleod

This comment has been minimized.

Copy link
Contributor Author

@carmacleod carmacleod commented Jun 1, 2019

I agree that tooltip role isn't currently very useful.
For what it's worth, I've taken a stab at describing our use case in #979.

@scottaohara

This comment has been minimized.

Copy link
Member

@scottaohara scottaohara commented Jun 2, 2019

Thank you both for the replies here. I plan on making some more comments in the other issue, but regarding this issue of aria-labelledby in particular, I'm curious why visually displaying the accessible name (like a "tooltip") would require it to have a role=tooltip? Being that it's not a description, but a name.

Additionally, per Matt's comments in the other issue, I think we can agree that we wouldn't want to add any unnecessary verbosity to what would otherwise be just announcing the accessible name of an element, in giving it a role of tooltip. So I'm just unsure of why, if there are already ways to produce the desired announcement of an accessible name, and expose the name visually, without using a role, we would update the spec to make an allowance for a use case that doesn't require or add benefit from the role?

@jnurthen jnurthen modified the milestones: ARIA 1.2, ARIA 1.3 Sep 27, 2019
@jnurthen

This comment has been minimized.

Copy link
Member

@jnurthen jnurthen commented Sep 27, 2019

Lets close this and discuss in #979

@jnurthen jnurthen closed this Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.