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

Marked-up text from other namespaces in <title> and <desc> #241

Closed
BigBadaboom opened this issue Aug 20, 2016 · 4 comments
Closed

Marked-up text from other namespaces in <title> and <desc> #241

BigBadaboom opened this issue Aug 20, 2016 · 4 comments

Comments

@BigBadaboom
Copy link
Contributor

In the section of the spec on title and desc, the following paragraph is buried at the end of the desc element description.

Description and title elements may contain marked-up text from other namespaces. 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.

Since it applies to both title and desc,, I think it would be better moved to the intro section of 4.5.1.


Also, should it be clearly stated here that if users use elements from other namespaces, then those namespaces must be declared - at least for standalone documents?

<svg ... xmlns:html="http://www.w3.org/1999/xhtml">
   <title>Some <html:strong>important</html:strong> stuff</title>
  ...
</svg>

There is language to this effect in the foreignObject section. But not in this chapter.


Finally, I think it might also be good to add a note, such as:

Authors of SVG documents should be aware that non-browser implementations of the SVG standard are not required to support markup from other namespaces, such as HTML. So any markup effects applied to <tile> and <desc> content may not be reproduced in those circumstances.

@BigBadaboom
Copy link
Contributor Author

I guess the second part of my issue above could be covered by referencing section 11.5. Foreign namespaces and private data

@AmeliaBR
Copy link
Contributor

Good points. Also might be worth an informative note that the HTML parser treats these elements as "HTML insertion points" and will parse all markup as being in the HTML namespace, unless it is contained in an <svg> or <math> element.

For the most part, the important detail here is "Markup in SVG descriptive elements will not have any useful effect!". But just in case someone is using scripts to extract <desc> and <title> content and clone it into visible labels...

@AmeliaBR
Copy link
Contributor

@BigBadaboom Made some changes; let me know if this covers all your concerns.

@BigBadaboom
Copy link
Contributor Author

Thanks. Looks good. I had one tiny suggestion though:

User agents may use markup within 'title'
to influence the visual presentation of titles...

might read better as:

User agents may allow markup within 'title'
to influence the visual presentation of titles...

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

No branches or pull requests

3 participants