- From: Lyndon Brown via GitHub <noreply@w3.org>
- Date: Tue, 13 Jan 2026 02:20:04 +0000
- To: public-svg-issues@w3.org
jnqnfe has just created a new issue for https://github.com/w3c/svgwg: == System-language dependant titles == The `<title>` element allows for providing a 'short alternate text' for an element. Browsers will show this as a tooltip when hovering the cursor over the respective element, or, where used directly under an `<svg>` element, display it as a browser tab label or window title. While the `<title>` element has a `lang` attribute, there seems to currently be no way of making `<title>` text depend upon system language, unlike `<text>` and `<tspan>`. **Use case example 1** I have an SVG diagram which includes some labels. To suit the diagram these labels have to be extremely short. For some of them it would be preferable to use a `<title>` to provide a slightly longer text variant which could be revealed upon hovering over the element, to aid with understanding. (Simply presenting longer labels in a smaller font would be far from ideal). This diagram though is multi-lingual, containing translations of all of the `<text>` labels via `<switch>` and `systemLanguage`. While translation works perfectly for the actual displayed labels, it seems to be impossible to translate such `<title>` tooltips (and the document title). I tried using `aria-label` on the translated `<text>`/`<tspan>` elements as an alternative to using `<title>`, but neither Firefox nor Chrome display this as a tooltip. I also tried using `<switch>` and `<text>`/`<tspan>` elements with `systemLanguage` under a `<title>` element in Firefox, but the tooltip just contained every translation, so it seems that use isn't supported (though I haven't double checked the spec). **Use case example 2** Such ability to translate `<title>` elements could be useful to the [World Map SVG on wikipedia](https://commons.wikimedia.org/wiki/File:BlankMap-World.svg). This uses `<title>` elements such that when you hover over a country region a tooltip appears with the country name. As is though, only English names can be shown. If `<title>` translations were supported, it could display translated country names for different users. (Without having to create separate, translated copies of the file). Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1050 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 13 January 2026 02:20:05 UTC