SVG labelling issue with ARIA

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

SVG labelling issue with ARIA

Chaals McCathie Nevile
Hi,

SVG issue https://github.com/w3c/svgwg/issues/116 is an i18n issue:

if you use e.g.

<rect width="100" height="100" aria-labeledby="fr-title-1 en-title-1  
es-title-1">
   <title lang="fr" id="fr-title-1">Assez carré</title>
   <title lang="en" id="en-title-1">Sort of square</title>
   <title lang="es" id="es-title-1">Es quadrilateral por lo menos</title>
</rect>
The multilingual selection model won't work with the ARIA name  
calculation, as written today.

Note that the idea of using multiple titles is at risk since it isn't  
implemented in browsers. The mechanism that does work is to use  
systemLanguage:

   <switch>
    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="jp">
     <title>これは日本語です</title>
    </circle>
    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="ru">
     <title>Вот что-то по-русски</title>
    </circle>
    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="en">
     <title>This is english</title>
    </circle>
    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="fr">
     <title>Voici français, le defaut</title>
    </circle>
   </switch>

Which is pretty ugly where you have a real structure to maintain...

Running the <switch> just for the titles doesn't work in any browser  
either :(

cheers

Chaals

--
Charles McCathie Nevile - web standards - CTO Office, Yandex
  [hidden email] - - - Find more at http://yandex.com

Reply | Threaded
Open this post in threaded view
|

RE: SVG labelling issue with ARIA

White, Jason J


>-----Original Message-----
>From: Chaals McCathie Nevile [mailto:[hidden email]]
>
>SVG issue https://github.com/w3c/svgwg/issues/116 is an i18n issue:
>
>if you use e.g.
>
><rect width="100" height="100" aria-labeledby="fr-title-1 en-title-1 es-title-
>1">
>   <title lang="fr" id="fr-title-1">Assez carré</title>
>   <title lang="en" id="en-title-1">Sort of square</title>
>   <title lang="es" id="es-title-1">Es quadrilateral por lo menos</title> </rect>
>The multilingual selection model won't work with the ARIA name calculation,
>as written today.
>

Correct. What you'll receive is a concatenation of all of the title text. I suppose you could use a single label reference, and a script could update the idref depending on the language in use, but even if this worked, it would be much more complicated than it ought to be.

SVG should solve this problem. If that doesn't happen, ARIA could add yet another property to carry multilingual labels - but not within the scope of ARIA 1.1 core.


________________________________

This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.

________________________________
Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Dr. Olaf Hoffmann
In reply to this post by Chaals McCathie Nevile

Chaals McCathie Nevile:
...

>Note that the idea of using multiple titles is at risk since it isn't  
>implemented in browsers. The mechanism that does work is to use  
>systemLanguage:
>
>   <switch>
>    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="jp">
>     <title>これは日本語です</title>
>    </circle>
>    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="ru">
>     <title>Вот что-то по-русски</title>
>    </circle>
>    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="en">
>     <title>This is english</title>
>    </circle>
>    <circle r="50" cx="450" cy="100" fill="purple" systemLanguage="fr">
>     <title>Voici français, le defaut</title>
>    </circle>
>   </switch>
>
>Which is pretty ugly where you have a real structure to maintain...
>
>Running the <switch> just for the titles doesn't work in any browser  
>either :(

It is even worse for the root svg element, obviously one cannot put a switch
around, one needs to put the switch around the title collection for
multilingual documents, which appear quite often for example at wikimedia
commons, but due to this problem typically without any text alternative at
all.

But this was already discussed here years ago - obviously no implementations
of the suggestions resulting from this discussion in this mailing list.

But this seems to be mainly yet another bug/gap in the usual viewers, not
really a problem of SVG recommendations.


Olaf

Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Robert Longson
In reply to this post by Chaals McCathie Nevile
The title element (https://www.w3.org/TR/SVG11/struct.html#InterfaceSVGTitleElement) does not list SVGTests https://www.w3.org/TR/SVG11/types.html#InterfaceSVGTests as one of its interfaces and so systemLanguage cannot be used with it. So title not working with switch in any browser is correct in the sense that they are all following the SVG specification there.

Robert.
Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Amelia Bellamy-Royds
In reply to this post by White, Jason J
I really don't see this as an issue for SVG specifically.  As Jason says, SVG (and the SVG Accessibility API Mapping spec) should solve this problem.

Ideally, you would not be using aria-labelledby in this case, you would be using the native labelling mechanism as defined in SVG and SVG-AAM.  Adding aria-labelledby pointing to a <title> is currently an unfortunate hack required to deal with browsers who do not support <title> natively.

Yes, it's unfortunate that this fallback hack can't "polyfill" the new SVG multilingual title-switch functionality, but the multilingual title switch was designed to have a simple SVG 1.1 fallback anyway: use the first <title> element.  So if you are going to add the redundant aria-labelledby attribute for fallback support, it should point to the first <title>.  That way, screen readers get the same text as visual users with tooltips on a browser that doesn't support the new feature (currently all of them).

Hopefully, browsers will implement both the multi-lingual title/desc behavior and proper SVG accessibility mappings together in the near future, and this ceases to be an issue.

Now, a secondary question is whether ARIA should implement its own general mechanism to provide multiple translations of alternative text.  But that would need to use a different mechanism than just a list of values in aria-labelledby, which already has a valid meaning.
Reply | Threaded
Open this post in threaded view
|

RE: SVG labelling issue with ARIA

White, Jason J

 

 

From: Amelia Bellamy-Royds [mailto:[hidden email]]
Sent: Thursday, April 21, 2016 5:46 PM

Now, a secondary question is whether ARIA should implement its own general mechanism to provide multiple translations of alternative text.  But that would need to use a different mechanism than just a list of values in aria-labelledby, which already has a valid meaning.

 

Correct. Since that can’t be done within the ARIA 1.1 schedule, SVG implementors have plenty of time and opportunity to solve the problem in the manner that Amelia suggests.

 



This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.


Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Dr. Olaf Hoffmann
In reply to this post by Chaals McCathie Nevile
Robert Longson:
>The title element (
>https://www.w3.org/TR/SVG11/struct.html#InterfaceSVGTitleElement) does not
>list SVGTests https://www.w3.org/TR/SVG11/types.html#InterfaceSVGTests as
>one of its interfaces and so systemLanguage cannot be used with it. So
>title not working with switch in any browser is correct in the sense that
>they are all following the SVG specification there.
>
>Robert.

The discussion in the past resulted in something slightly more complex - and
without a hint within the recommendation it is not obvious for authors and
implementors to do it this way.
Example:
https://upload.wikimedia.org/wikipedia/commons/0/0f/OttomanEmpire1300-1923.svg

A simpler and realiable method would be pretty useful, but there was no
interest in the past to care about multilingual documents (and text
alternatives).

Olaf

Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Amelia Bellamy-Royds
In reply to this post by Amelia Bellamy-Royds
Ouch, yes, of course.  James is right, you can't use the redundant aria-labelledby here, because it wouldn't be redundant, it would be a degradation of functionality.

So given browser support today, the practical matter is that you can't progressively enhance internationalization support without compromising the "graceful degradation" of accessibility support.


On 21 April 2016 at 23:14, James Nurthen <[hidden email]> wrote:
But won't the redundant aria-labelledby override the native labelling mechanism so when browsers implement the multi-lingual title switch it will require removing that aria-labelledby? Or does SVG work differently so the native mechanism takes precedence over the aria-labelledby?


On 4/21/2016 2:45 PM, Amelia Bellamy-Royds wrote:
Yes, it's unfortunate that this fallback hack can't "polyfill" the new SVG multilingual title-switch functionality, but the multilingual title switch was designed to have a simple SVG 1.1 fallback anyway: use the first <title> element.  So if you are going to add the redundant aria-labelledby attribute for fallback support, it should point to the first <title>.  That way, screen readers get the same text as visual users with tooltips on a browser that doesn't support the new feature (currently all of them).
Reply | Threaded
Open this post in threaded view
|

Re: SVG labelling issue with ARIA

Richard Schwerdtfeger-2
This is an authoring guidance discussion. 

We should not break ARIA mapping practices because they did something wrong. Also, title shows up as tooltips and the tooltip may be help information. In ARIA we intentionally leave title as a last resort. If the author decides to override things they should do it with intent in mind. 

Rich

On Apr 22, 2016, at 2:06 AM, Amelia Bellamy-Royds <[hidden email]> wrote:

Ouch, yes, of course.  James is right, you can't use the redundant aria-labelledby here, because it wouldn't be redundant, it would be a degradation of functionality.

So given browser support today, the practical matter is that you can't progressively enhance internationalization support without compromising the "graceful degradation" of accessibility support.


On 21 April 2016 at 23:14, James Nurthen <[hidden email]> wrote:
But won't the redundant aria-labelledby override the native labelling mechanism so when browsers implement the multi-lingual title switch it will require removing that aria-labelledby? Or does SVG work differently so the native mechanism takes precedence over the aria-labelledby?


On 4/21/2016 2:45 PM, Amelia Bellamy-Royds wrote:
Yes, it's unfortunate that this fallback hack can't "polyfill" the new SVG multilingual title-switch functionality, but the multilingual title switch was designed to have a simple SVG 1.1 fallback anyway: use the first <title> element.  So if you are going to add the redundant aria-labelledby attribute for fallback support, it should point to the first <title>.  That way, screen readers get the same text as visual users with tooltips on a browser that doesn't support the new feature (currently all of them).