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

Consider providing a way for authors to style the title attribute's tooltip #730

Closed
scottaohara opened this issue Apr 26, 2023 · 9 comments
Labels

Comments

@scottaohara
Copy link
Collaborator

One of the reasons (though there are others) that people want to implement custom tooltips is because the one produced by use of the title attribute lacks any way to style it. If there were a way to style this UI popup, potentially by introducing a ::title pseudo-selector for the element which the title attribute is specified, then this could honestly tick a really important box in making the title attribute more viable to developers, and decrease their need for implementing something custom.

Now, this would not solve all of the use cases for needing something more than what can presently be done with the title attribute... but those are proposals for another day. Introducing something 'small' like this would be focused, and immediately useful, while larger discussions about how to provide tooltips with more structured content continue.

@aleventhal
Copy link

aleventhal commented Apr 26, 2023

+1 This would have an easy adoption path for existing content. And it falls back to the current behavior, which is great too.

@gregwhitworth
Copy link
Member

@scottaohara couldn't this go directly to the CSSWG or would you want an explainer/proposal from the group?

@mfreed7
Copy link
Collaborator

mfreed7 commented May 10, 2023

+1 - I like this idea. There might be some implementation concerns, depending on how the existing tooltip rendering works. I.e. it might not be trivial to add arbitrary styling, if the tooltip is provided via some native OS widget. But that's not a good reason not to do this, so I'm in favor.

I do somewhat agree that this might be best to take directly to the CSSWG as a suggestion/request. The "explainer" is roughly a paragraph long. Just add a ::title pseudo element that references the tooltip popover.

There is some overlap between this proposal and the popover feature, but I don't think that's bad. And if this encourages the "easy" cases to just use the pseudo element, leaving the more complex cases to popover, that's likely a good thing.

@scottaohara
Copy link
Collaborator Author

@mfreed7 @gregwhitworth - is it even possible to transfer this issue over to the csswg? does anyone have the permissions available to do that? I obviously have not gotten around to refiling the issue, but transferring it seems like it could achieve that while also bringing along the current discussion thread?

if not, i can re-file over there and just reference back this issue.

@mfreed7
Copy link
Collaborator

mfreed7 commented May 26, 2023

Hmm, I don't think that's possible, at least for me. Moving issues between accounts is some kind of voodoo I haven't learned. Perhaps Greg knows how?

@dbaron
Copy link
Collaborator

dbaron commented May 26, 2023

https://docs.github.com/en/issues/tracking-your-work-with-issues/transferring-an-issue-to-another-repository says transfer isn't possible between repositories owned by different users (openui and w3c in this case). (I see the "Transfer issue" UI, but it doesn't give any allowable destinations.)

@scottaohara
Copy link
Collaborator Author

thanks both. i'll repost the issue then.

Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label Nov 23, 2023
@scottaohara
Copy link
Collaborator Author

closing this issue since there is an issue for this in the css wg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants