Styled Browser Tooltips
Posted by geetarista May 08, 2008
There are many solutions out there to style cool-looking tooltips using css, javascript, or a mixture of both. Usually people try to go with CSS-only solutions since they degrade nicely and are more accessible. I have seen really nice tooltips that look really nice, but it makes me wonder about something. Most of these implementations use a class on elements that are basically created to act as a tooltip. So why does CSS not have the ability to style specific HTML attributes such as title, alt, etc.? Default title attributes look exactly the same in most browsers and there is obviously a way for browsers to style those attributes. CSS3 adds to the possibilities of creating good looking tooltips, but it still does not offer the ability to style the browser’s own tooltips. I really wonder why since this is so much simpler than most of the hacks out there. Is this something that can be done with Greasemonkey? I understand that most people create their own tooltips for effect, but this type of application could help with design and accessibility as well. Think about a site that uses mostly yellow in its design. A standard title tooltip would obviously be difficult to read.
Could this also open up more possibilities for the rest of the HTML attributes? I know I am raising several questions here, but I do not see why this could be so hard to implement. Maybe there is an obvious answer out there, but I have yet to find it.