Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mattgarrish opened this issue Jul 11, 2022 · 1 comment · Fixed by #2358
Closed

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

mattgarrish opened this issue Jul 11, 2022 · 1 comment · Fixed by #2358
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Topic-ContentDocs The issue affects EPUB content documents

Comments

@mattgarrish
Copy link
Member

mattgarrish commented Jul 11, 2022

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.

@mattgarrish mattgarrish added the Topic-ContentDocs The issue affects EPUB content documents label Jul 11, 2022
@mattgarrish
Copy link
Member Author

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.

@mattgarrish mattgarrish added the EPUB33 Issues addressed in the EPUB 3.3 revision label Jul 20, 2022
@mattgarrish mattgarrish added the Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPUB33 Issues addressed in the EPUB 3.3 revision Spec-EPUB3 The issue affects the core EPUB 3.3 Recommendation Topic-ContentDocs The issue affects EPUB content documents
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant