Skip to content

svg.global_attributes.lang - does not consider automatic selection of sibling elements #28804

@Crissov

Description

@Crissov

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 their lang attribute 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:lang over lang?
  • Do browser emit a warning or error message if
    • values of xml:lang and lang differ?
    • both, xml:lang and lang, are used on the same element?
    • if deprecated xml:lang is used instead of lang?
    • if lang is 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?

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?

w3c/svgwg#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:svgCompat data for SVG features. https://developer.mozilla.org/docs/Web/SVGinfo neededThis needs more information to review or act on.needs browser bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions