SVG Action 3728 and SVG Task force action 1582


I took a pass at rewriting the <title> and <desc information in the SVG
specification. Please review for the SVG accessibility task force meeting.

Associated actions:

- http://www.w3.org/Graphics/SVG/WG/track/actions/3728

- https://www.w3.org/WAI/PF/Group/track/actions/1582

Here is a reference to the SVG title element text

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


Current text and logged issues:

Each container element or graphics element in an SVG drawing can supply one
or more ‘desc’ and/or one or more ‘title’ description strings where the
description is text-only. When the current SVG document fragment is
rendered as SVG on visual media, ‘desc’ and ‘title’ elements are not
rendered as part of the graphics. User agents may, however, for example,
display the ‘title’ element as a tooltip, as the pointing device moves over
particular elements. Alternate presentations are possible, both visual and
aural, which display the ‘desc’ and ‘title’ elements but do not display ‘
path’ elements or other graphics elements. This is readily achieved by
using a different (perhaps user) style sheet. For deep hierarchies, and for
following ‘use’ element references, it is sometimes desirable to allow the
user to control how deep they drill down into descriptive text.


Authors should always provide a ‘title’ child element to the outermost svg
element within a stand-alone SVG document. The ‘title’ child element to an
‘svg’ element serves the purposes of identifying the content of the given
SVG document fragment. Since users often consult documents out of context,
authors should provide context-rich titles. Thus, instead of a title such
as "Introduction", which doesn't provide much contextual background,
authors should supply a title such as "Introduction to Medieval
Bee-Keeping" instead. For reasons of accessibility, user agents should
always make the content of the ‘title’ child element to the outermost svg
element available to users. The mechanism for doing so depends on the user
agent (e.g., as a caption, spoken).


Issue: We have this sentence here about tooltips which is stronger than the
earlier note that some implementations do this. We should look at how HTML
describes the ‘title’ attribute and whether a tooltip is required,
suggested, etc., and follow that.


Issue: Once we have said how ARIA attributes can be used in SVG, we might
want to define ‘title’ and ‘desc’ in a manner consistent with them, so that
it is clear what it means for example for an element to have both a ‘desc’
element child and an ‘aria-describedby’ attribute.


Proposed text:

Each container element or graphics element in an SVG drawing can supply one
or more ‘desc’ and/or one or more ‘title’ description strings where the
description is text-only. When the current SVG document fragment is
rendered as SVG on visual media, ‘desc’ and ‘title’ elements are not
rendered as part of the graphics. The 'title' child element represents
advisory information for the element, such as would be appropriate for a
tooltip. On a link, this could be the title or a description of the target
resource; on an image or drawing object, it could be the image credit or
short description of the image; it could be further information about the
source; on interactive content, it could be a label for, or instructions
for, use of the element; and so forth. The value is text. The 'desc'
element represents more detailed, textual information, for the element.
This is typically exposed to assistive technologies to provide more
detailed information, such as help information about the element. The value
is text.

Authors are provided two vehicles for providing a visible label with a
drawing element. The first way is to embed text within the drawing element.
The second is to associate visible text with a drawing element through the
use of aria-labelledby on the element being labelled. Authors may provide a
non-visible label to a drawing element by applying an aria-label to it but
also by providing a descendant <title> element. An author may also expose a
hidden label on an element to an assistive technologies through the use of
aria-labelledby when it points to content that is hidden and contains text.
It is common for user agents to render the <title> element as a tooltip.
Tooltips are an important way to convey alternative text information for a
drawing object where the text label is either not readily visible or could
be rendered in a clearer way in response to passing over the drawing
element with a pointing device. One benefit of using a descendant 'title'
element can be seen when using SVG to to produce an image button or small
drawing that has no visible text but it is important to be able to render a
short textual equivalent label, or tooltip, when a pointing device passes
over the button.

Authors should provide a ‘title’ child element to the outermost svg element
within a stand-alone SVG document. Since users often consult documents out
of context, authors should provide context-rich titles. Thus, instead of a
title such as "Introduction", which doesn't provide much contextual
background, authors should supply a title such as "Introduction to Medieval
Bee-Keeping" instead. For reasons of accessibility, user agents should
always make the content of the ‘title’ child element to the outermost svg
element available to users. The mechanism for doing so depends on the user
agent (e.g., as a caption, spoken).

If the SVG document is embedded in an HTML document, the outermost svg
element may only serve to act as a container for SVG drawings and applying
a 'title' child element may not be of value.  Applying a 'title" element to
the outermost SVG element in this may may result in a tooltip being
generated.

Unlike the desc element, authors also have the ability to associate more
detailed information with content that includes visible text. This can be
achieved by applying aria-describedby to the element, or container of
elements being described and passing an ID reference to content that
includes text that describes the element in question. However, if the text
describing the object is hidden the text within the description would be
exposed to assistive technologies as detailed text information, similar to
a descendant 'desc' element.

Both visual and aural Alternative renderings of ‘title’ element or 'desc'
element are possible through the use of style sheets.

Rich

Received on Monday, 16 February 2015 23:16:28 UTC