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

Define purpose of other namespaced markup in <title> and <desc> #101

Closed
nikosandronikos opened this issue Apr 13, 2016 · 3 comments · Fixed by #170
Closed

Define purpose of other namespaced markup in <title> and <desc> #101

nikosandronikos opened this issue Apr 13, 2016 · 3 comments · Fixed by #170

Comments

@nikosandronikos
Copy link
Member

https://svgwg.org/svg2-draft/struct.html#issue23

Prior discussion, from https://www.w3.org/2015/03/05-svg-minutes.html#item12:

ed: I think the issue is to say what this purpose is

heycam: presumably to include some more structured descriptions rather than just plain text

AmeliaBR: and originally also so that you could have complex fallback content, in a browser that didn't support SVG
... that's no longer relevant though
... I'm pretty sure the main purpose is so you can have structured content inside <desc>

heycam: note also the HTML parsing algorithm allows HTML content inside here

AmeliaBR: I'm not sure if there's much of a benefit within <title>, but some browsers do support <br> within <title> and some don't
... a weird random thing
... maybe that should be cleaned up

heycam: within SVG documents or HTML title?

http://stackoverflow.com/questions/23626422/tooltip-to-display-in-two-separate-lines-not-working-in-firefox/25690802#25690802

AmeliaBR: so this may have been coming from this comment that external namespaces are OK
... so some support <br> within title

Tav: I don't really like the idea of having <br> in there
... maybe white-space:pre-line?

AmeliaBR: that's the other thing that's changed since SVG 1.1
... in the title="" in HTML you can put line breaks
... so either way isn't conforming to specs, but all browsers allow one way or the other
... either with <br> or a hard line break

heycam: and that's a hard line break without setting the white-space property?

AmeliaBR: yes
... and only for <title>

Tav: putting a <br> seems wrong to me
... allowing white space to be preserved seems more compatible

AmeliaBR: and with the new white-space option, I think that will be more reasonable

Tav: you can style your title

AmeliaBR: it's tricky, because tooltips aren't styled with CSS
... I have no idea whether white-space:pre would apply

heycam: do you think we need a issue in here to define this kind of thing?

@nikosandronikos
Copy link
Member Author

@nikosandronikos nikosandronikos modified the milestone: CR Apr 29, 2016
@nikosandronikos
Copy link
Member Author

For SVG 2, we can leave it as allowed, but undefined.

So authors can put HTML or whatever inside title and desc and it won't break anything, but it won't have a defined beahviour.

@jarek-foksa
Copy link

@nikosandronikos isn't this what <metadata> element should be used for? It's even allowed in the same places where <title> and <desc> can appear.

I would rather keep it simple and allow only character data inside <title> and <desc>.

AmeliaBR added a commit that referenced this issue Jun 20, 2016
- Move the blue boxes down to be associated with the sections specific to title and desc, respectively (after general rules that apply to both)
- Re-arrange a number of sentences/paragraphs to group together normative text for authors vs user agents
- Clarify rules & add example for matching multi-lingual descriptive text
- SHOULD > MUST for user agent exposing text content to accessibility APIs
- Authors SHOULD NOT, authoring tools MUST NOT include empty title/desc (this causes a mess on the accessibility side)
- Advice for which elements should have title/desc
- Purpose of title/desc on non-rendered content
- Clean up the examples of purpose of title & desc
- Mention aria-labelledby when warning against redundant title content
- User agents SHOULD make titles available to all users on interaction (tooltips still being only one possible way of doing so)
- Clarify how this differs in practice for title on the root element
- Clean up paragraph on aria-describedby
- remove generic example (redundant given the earlier example)
- remove inaccurate statements about alternative plain-text presentations
- add warning that other namespace markup within title/desc has no affect on accessible alternative text (clears spec issue 23)

Addresses a lot of #102, fixes #101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants