svg.global_attributes.lang - does not consider automatic selection of sibling elements
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
What type of issue is this?
Missing compatibility data
What information was incorrect, unhelpful, or incomplete?
SVG2 clarifies that multiple sibling <title> or <desc> elements are only valid if the values of their (xml:)lang attributes differ. The user agent should then select the choice that best matches the user‘s linguistic preference.
Apparently, the compatibility data currently only covers basic support, i.e. whether browsers can successfully parse that attribute at all. The support table for the respective elements also include whether a tooltip is shown, but not which.
The SVG specification notes in Issue 67 that this feature was at risk for lack of known implementations. Therefore, collecting this data could really help improve the situation of SVG internationalization, now that there is a WG again working on finalizing the standard.
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
A combined supports result for these tests:
- Do browsers choose the best fitting sibling
<title>or<desc>element based upon theirlangattribute values and user configuration, by displaying its content as a tooltip (or window/tab caption)? - Do browsers ignore all other siblings?
- Do browsers inherit the language from ancestors if the attribute is omitted?
- Do browsers choose the sibling with an empty language attribute value as default or fallback if no better match is found?
- Do browsers choose the first sibling if no match is found at all?
- Do browsers choose partial or approximate BCP47 matches over defaults? (unclear if expected behavior)
- Do browsers prefer
xml:langoverlang? - Do browser emit a warning or error message if
- values of
xml:langandlangdiffer? - both,
xml:langandlang, are used on the same element? - if deprecated
xml:langis used instead oflang? - if
langis used in an image declared as conforming to SVG 1.x? - if multiple
<title>or<desc>children are used in an image declared as conforming to SVG 1.x?
- values of
Did you test this? If so, how?
Not yet
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
https://github.com/w3c/svgwg/issues/1050
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/lang
MDN metadata
MDN page report details
- Query:
svg.global_attributes.lang - Report started: 2026-01-13T08:14:48.995Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MDN SVG lang page and the linked SVG2 description, SVGWG Issue 67, and Issue 1050. Build browser tests for sibling title and desc language selection, inheritance, fallbacks, lang/xml:lang handling, and related warnings, then record the resulting compatibility data in the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100