frend / frend.co

Frend — A collection of accessible, modern front-end components.
http://frend.co
MIT License
635 stars 25 forks source link

tooltip issue #74

Open goetsu opened 8 years ago

goetsu commented 8 years ago

Hi, to conform to the ARIA design pattern the tooltip need to become visibile with keyboard focus. Furthermore you don't need aria-live on the tooltip if the content isn't generate on the fly and you also can remove aria-expanded or change it to aria-haspopup="true" because it's an hover/focus tooltip not on that user trigger with enter / click

adamduncan commented 8 years ago

Thanks for all the feedback, @goetsu. The pattern here has been influenced by Paciello Group's ToggleTip, which was also covered in a recent talk by @LJWatson.

Do you think it might be beneficial to move this pattern back towards the standard ARIA tooltip implementation, as you've described, to make sure its function is clearer? Both approaches seem to have their benefits.

goetsu commented 8 years ago

Hi

toggletip is activated on click not on hover and in that case aria-expanded is relevant. It's not on the case of a tooltip on hover/focus (and the aria-live is used on toggletip because the content is generated on demand not just hidden). So it depend on what you want to achieve if it's a toggletip name it toggletip not tooltip and if it's a tooltip it's best to follow the design pattern I think.

LJWatson commented 8 years ago

It's worth mentioning that the use case for a tooltip and toggletip are not the same.

A tooltip is triggered on hover/focus and remains available until focus/hover moves away from the element to which the tooltip is attached. A toggletip is triggered on click/keypress and it remains available until dismissed by click/keypress.

Tooltips are intended for short bits of information that can be read/heard in one go. Toggletips are intended for longer and structured bits of content, and remain available for further inspection/reading before being dismissed.

A toggletip also overcomes the problems that tooltips present to screen magnifier users, where the tooltip content obscures the content underneath at large magnification.

thomasdigby commented 8 years ago

Thanks for the input @goetsu @LJWatson, I think we'll follow convention on the tooltip and update it to more closely match the ARIA spec.

I think there is still room for the toggletip pattern as it serves a different purpose, so we will probably branch it off to a different component and document the use-cases for both.