- From: Richard Schwerdtfeger <schwer@us.ibm.com>
- Date: Fri, 23 Jan 2015 13:46:00 -0600
- To: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
- Cc: public-svg-a11y@w3.org
- Message-ID: <OF8362021E.27E39715-ON86257DD6.006AFF6C-86257DD6.006C94AF@us.ibm.com>
Hi Amelia, I think that it depends on the application but the default should be that the user agent renders a tooltip from the title attribute. If no aria label is applied and there is a title attribute then it falls back to <title>. The problem is that because user agents don't specify how to definitively process it then authors don't know how to reliably use it. That, to me, is a problem with SVG. Now that we have aria-label I think it would be much safer to make it a normative requirement that <title> show a tooltip. Note: Google originally asked for this as there were times where they did not want to render text visibly that acted as a label and they did not want to go through the difficulty of dealing with aria-labelledby and hiding the text. What I don't know is the backward compatibility impact. So, if you were creating say a menu bar then you would not want to add a title attribute and you would need to either render the text directly. Some applications may use the title as a visible "hint" vs. label text. That is why it is left as a last resort. aria-describedby is use to reference a much longer description embedded in the page that may or may not be visible depending on the authors intent. It may be there just for assistive technologies but it may also be used to reference a long description such as a detailed description for a large drawing on the page. Cheers, Rich Rich Schwerdtfeger From: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com> To: Richard Schwerdtfeger/Austin/IBM@IBMUS Cc: public-svg-a11y@w3.org Date: 01/23/2015 12:27 PM Subject: Re: Comments on SVG Accessibility Mappings -- Default and Allowed Semantics Then perhaps the "tooltip" ARIA role isn't correct, but that content should still be available to the user somehow. Maybe just as plain text content for the parent shape. If it isn't, then we need to be very clear in guidance to authors that if you use `aria-label` you need to duplicate the tooltip information or explicitly point to the title using `aria-describedby`. The SVG 1.1 language may say that it is optional to display <title> as tooltips, but every interactive implementation does it, and there are notes in the SVG2 draft about possibly making it a normative requirement. Amelia On 23 January 2015 at 10:54, Richard Schwerdtfeger <schwer@us.ibm.com> wrote: I do not agree. We do not do that for title in HTML for the title attribute. Also, tooltips need to be shown when you mouse over them. This is not stated anywhere in the SVG specification. In fact, I consider this a problem with SVG. From my perspective this is underspecified. Also if it the tooltip were rendered on a hover it would mean that there would be no need to have a special role of tooltip for it. In the case of tooltip the real value add is that a sighted user with a cognitive impairment can move their mouse over an element and have the tooltip text rendered to the user. The reason for tooltip text in the aria spec. is to addressed the situation where an author creates a custom tooltip that is rendered using CSS or javaScript. Rich Rich Schwerdtfeger Inactive hide details for Amelia Bellamy-Royds ---01/23/2015 10:41:45 AM---Another follow-up. If <title> is NOT used as (partAmelia Bellamy-Royds ---01/23/2015 10:41:45 AM---Another follow-up. If `<title>` is NOT used as (part of) the ARIA name for its parent because From: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com> To: public-svg-a11y@w3.org Date: 01/23/2015 10:41 AM Subject: Re: Comments on SVG Accessibility Mappings -- Default and Allowed Semantics Another follow-up. If `<title>` is NOT used as (part of) the ARIA name for its parent because of ARIA labelling attributes, it SHOULD be included in the accessibility tree with the role of "tooltip", to match its function on a visible display. This would correspond with advice to authors: Use <title> to label an element, except when the <title> value is used for a tooltip that does not make an effective name, in which case add an `aria-label` or `aria-labelledby` attribute. However, in this case we still want the tooltip information to be available to AT users! An example would be the following very simple bar chart. The `<title>` elements on the bars are used as tooltips to give the exact numerical value of each bar. The natural label for each bar, however, is the label from the x-axis: <svg viewBox="0 0 100 120"> <rect id="bar1" aria-labelledby="label1" x="10" y="50" height="50" width="30" fill="red"> <title>50%</title> </rect> <rect id="bar2" aria-labelledby="label2" x="60" y="30" height="70" width="30" fill="blue"> <title>70%</title> </rect> <line x1="0" x2="100" y1="100" y2="100" stroke="black" /> <g text-anchor="middle" font-size="10"> <text id="label1" x="25" y="100" dy="1em">Team A</text> <text id="label2" x="75" y="100" dy="1em">Team B</text> </svg> Live Example: http://codepen.io/AmeliaBR/pen/WbOREM Or view it full page if you want to test it with current ATs, without all the code being read back to you: http://codepen.io/AmeliaBR/full/WbOREM/ I don't know what, if anything, should be done with <desc> elements if the author has included both a <desc> and something else linked with aria-describedby. The content of <desc> is not available through normal use of the SVG, so I guess the most consistent behavior is also to ignore it for accessibility APIs. --Amelia BR
Attachments
- image/gif attachment: graycol.gif
Received on Friday, 23 January 2015 19:47:30 UTC