|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-10-22 21:01:57
|
On Saturday, 22 October 2011, pl...@pi... wrote: > So the svg title is not so much a property of the plot but the output > file. Part of the problem here is that the SVG spec doesn't say what <title> is supposed to do. It is left up to the implementation of the viewer. Furthermore, the <title> element is valid at multiple levels, and the viewer is apparently free to different things with the titles at different levels. Let me recap. Up until our current discussion, the <title> element was being used inside the group bounding each indivual plot within the graph. The behavior I observe for firefox/chrome/konqueror/opera is that when the title is encountered at this level it is used to provide a pop-up information box on mouse-over. Firefox, but not the other browsers, _also_ uses the title of the first group to label the window. I actually think that's a bug, but the spec does allow it. The current discussion is about adding a <title> element at the top level, which is a different thing. Firefox/opera/chrome, but not konqueror, use a title at the top level to label the window if it is present. I've added that to the svg terminal driver in CVS. There's a wrinkle, however. It actually makes more sense to have the window label match the file name, which is what all the browsers except firefox were doing before. The reason I think this is that every file is guaranteed to get a new name, whereas unless you keep closing and re-opening the terminal the "name" attribute will remain the same across files. This means that for all files except the first one, the name shown in the browser window bar will probably be wrong. The code I added to CVS loads the top level title with "name". But for the reasons stated above I'm not entirely happy with that. Either the file name or the plot title (from "set title") makes more sense to me. Ethan |