Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVG title delay

Tags:

css

svg

I'm using a <title> element inside a SVG <rect> as a sort of a tooltip. Is there a way to tweak the delay after which the tooltip is displayed? In Chrome it takes a few seconds until the tooltip shows up, which feels very slow. Interestingly, after the first tooltip is shown all the others show up immediately.

Edit

It seems that it's only slow on my OSX Chrome, not on Windows.

Fiddle: http://jsfiddle.net/assaflavie/aLyQr/

Is there a way to shorten the delay to a few hundred ms?

like image 390
Assaf Lavie Avatar asked Nov 26 '13 18:11

Assaf Lavie


People also ask

Can SVG have title attribute?

The title attribute is placed on the <svg> opening tag. The value can be any string. Hover over the svg and a tooltip appears.

Should SVG have title?

The <title> tag for an SVG should be brief, much like an alt attribute for an image. In the SVG tag, include an aria-labelledby attribute that points to the <title> tag. If there is more than one shape, it can be a good idea to include a title tag for each shape group.


1 Answers

No. It is totally up to the user agent what delay it uses. The only solution would be to generate your own tooltips using mouseover/mouseout events and javascript.

like image 70
Paul LeBeau Avatar answered Sep 19 '22 23:09

Paul LeBeau