Re: Effect of role=presentation on img elements with svg

Bryan Garaventa, Tue, 4 Feb 2014 16:52:48 -0800:
> Personally, I like the suggestion to recommend aria-hidden='true' for 
> images, svg or otherwise, when it's desired to hide them completely 
> as decorative. It seems to more accurately represent the purpose of 
> the action.

Some would perhaps fear that, if applied to <img src=SVG>, 
aria-hidden="true" would make the SVG inaccessible … ?

> Would the following two statements be more comprehensive to explain 
> the difference between the two as they stand at the moment?
> 
> To hide the current element, including all child nodes if present, 
> use aria-hidden="true".

Yes, but replace “child nodes” with ”descendants” - which is a word the 
accessible name calculation uses, provided ”descendants” is accurately 
defined, that is.)

> To suppress only the current element structure, and leave all child 
> nodes alone if present, use role="presentation".

Ditto w.r.t. ”child nodes”.

> (To me, the word suppress means the same as nullify, basically to 
> remove the element wrapper.)

Suppress is much better than role="null(ify)". Could 
role="suppress(ed)" work?

Role="suppress" would fit well with the idea that it is the *role*  - 
and not the element - that is suppressed. (By contrast, role=flatten 
sounds like it attacks the element.) Role="suppress" as well signals 
that the element has a starting point - a default role if 
role="suppressed" is removed.

The presentation role seems to be very much a (reduction) *process* 
thing: The end result of the role suppression depends a little on the 
starting point. Not only does it depend on the kind of element it is 
applied to - it even depends on the content of the particular element. 
(E.g. in the case of <img>,  it depends on whether it embeds an SVG 
with accessible text inside or another graphic. And for <video>, it 
apparently has no effect.)

I think it is good if the new name of the presentation role would make 
authors ask themselves about its actual effect. And I think 
role="suppress" has potential in that regard. With role="presentation", 
the problem very much has become that authors *think* they know what it 
does.
-- 
Leif Halvard Silli

Received on Wednesday, 5 February 2014 02:57:03 UTC