Skip to content

What is "XHTML content document Phrasing content"? #2355

Closed

Description

@mattgarrish

The SVG content document definition has this requirement:

The [svg] title element MUST contain only valid XHTML content document Phrasing content.

The link just redirects back to the general xhtml requirements, however; there are no references to phrasing content.

I assume this is supposed to mean HTML phrasing content that conforms to the XHTML content document restrictions, but it's not clear at all from the description.

It also makes it sound like you have to have an xhtml namespaced element even if the title is text only. I know the phrasing content definition includes text, but the description makes it sound like all content needs to be in the xhtml namespace.

Could we perhaps rewrite this more simply like:

The [svg] title element MAY contain [[html]] phrasing content that conforms to 6.1.4 XHTML requirements. It MUST NOT contain elements from other namespaces.

Activity

  1. mattgarrish commented on Jul 12, 2022

    @mattgarrish
    MemberAuthor

    Although, going back to the SVG spec definition, this is kind of a weird restriction. According to SVG2:

    The display value for the ‘title’ and ‘desc’ elements must always be set to none by the user agent style sheet, and this declaration must have importance over any other CSS rule or presentation attribute.

    So titles are never displayed by default, and the definition says the element is never-rendered content. The spec goes on to reinforce this:

    Description and title elements may contain marked-up text from other namespaces, using standard XML mechanisms to indicate the namespace. However, authors should not rely on such markup to provide meaning to alternative text; only the plain text content is currently required to be exposed to assistive technologies.

    The only purpose of markup in a title appears to be optional and probably not supported:

    User agents may use markup within ‘title’ to influence the visual presentation of titles (such as tooltips), but are not required to do so.

    So the restriction is just in case a reading system wants to style a tool tip? Meanwhile we allow foreign elements everywhere else?

    I just checked epubcheck and it doesn't enforce this restriction. You can put any elements in the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EPUB33Issues fixed in the EPUB 3.3 revisionSpec-EPUB3The issue affects the core EPUB 3.X Recommendation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions