Given that a lot of people nowadays (2015) use mobile browsers, and title
still hasn't found a form of exposure in mobile browsers, maybe it's time to deprecate reliance upon title
for meaningful information.
It should never be used for critical information, but it is now becoming dubious for useful information, because if that information is useful and cannot be shown to half the users, then another way of showing it to almost all users needs to be found.
For static pages, perhaps some visible text near to the relevant control, even as fine print. For server-generated pages, browser sniffing could provide that only for mobile browsers. On the client side, javascript could be used to trap the focus event, via bubbling, to show the extra text next to the currently focussed element. That would minimise the screen space taken up, but would not necessarily be of much use, since, in a lot of instances, bringing focus to a control can only be done in a way that immediately activates its action, bypassing the ability to find out about it before using it!
Over all though, it appears that the difficulties of showing the title
attribute on mobile devices, may lead to its demise, mostly due to needing an alternative that is more universal. That is a pity, because mobiles could use a way to show such extra info on-demand, without taking up the limited screen space.
It seems strange that the w3c and mobile browser makers did not do anything about this issue a long time ago. At least they could have displayed the title text on top of the menu that appears when a long press on a control is made.
Personally, I wish it was placed at the top of a right-click/long-touch menu, as it won't timeout, and would be available on all browsers.
The other alternative is to construct footnotes, so an [n] type superscript is put next to the element/text needing more info, linking to explanatory text in a list at the bottom of the page. Each of those can have a similar [n] type link back to the original text/element. That way, it keeps the display uncluttered, but provides easy bidirectional swapping in a simple way. Sometimes, old print media ways, with a little hyperlink help, are best.
The title
attribute has been hijacked by some browsers to provide help text for the pattern attribute, in that its text pops up if the pattern doesn't match the text in the input element. Typically, it is to provide examples of the right format.
title
attributed element and see a tooltip. Since phones can't yet detect hovering, I expected to need to press on the screen there too. I also kind of expected the mobile browser to deal with this intelligently since I did set thetitle
attribute properly. Maybe some kind of indicator there was a tooltip and a way to see it... or maybe it automatically comes up until you click elsewhere... I guess I didn't expect the browser to disregard my HTML. – Buchheimspan:hover:after { content: attr(title) }
would reveal more information. – Pawnspan:hover:after
css you mentioned, that is supposed to make this work on an iPhone as well? – Buchheimspan:hover:after { content: attr(title) }
does not work on iPhone or emulator. If the text can be selected, the OS will attempt to select it...so anything longer than a click is going to work against what you're trying to do. – Measlyspan[title] > * { user-select: none}
span[title]:hover > * { user-select: auto }
. – Submerged