-
Notifications
You must be signed in to change notification settings - Fork 126
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
SVG-AAM / Core AAM: Consider explicit language regarding objects with presentational role and ARIA attributes #136
Comments
Joanie, We intend that any element with a role none or role presentation be omitted In SVG, there are lots of times when a group is used for adding style We have a wiki page with testable statements - which we will use to
Watson, IBM, W3C IBM Watson Watson Release Management and Quality From: Joanmarie notifications@github.com In the SVG-AAM's 5.1.1 Excluding Elements from the Accessibility Tree there
One should, of course, consult the CORE-AAM as the good note states. But a <rect role="none" aria-label="Am I Here?" x="1" y="1" width="10"' there should be no accessible object. If one consults the CORE-AAM for the normative text, 5.1.1 Excluding
So unless the ARIA spec defines a rule for none/presentation that says There's a lot of text in the ARIA spec regarding the presentation role, but
(emphasis added) The aria-label attribute is global. So then the rect element in the example I mention all of this for a couple of reasons:
— |
@fredesch: Thanks for the explanation! Your statement:
Only serves to reinforce what I state in the issue title, namely that explicit language is called for. |
Two things: First, what @joanmarie has uncovered in her research is that the ARIA spec appears to contradict this, since, as she quoted, it does say (paraphrase) that even if role="presentation" or "none", if the element also has a global ARIA property, that property MUST be exposed. What is unclear is how said exposure is accomplished. It might mean that the presentation role is ignored, and an accessible is created. Or, it might mean that the global properties are exposed on an existing accessible, possibly the parent accessible. At the very least, something needs to be added to the ARIA specification of presentation/none to clear this up. Secondly, the magic hammer is not absolute when it comes to events. Although this is somewhat unrelated to the issue at hand, if the element has a @tabindex on it, or an @id that designates it as a potential active descendant, or has a click handler, or other event handler, then the element can cause accessible events. Accessible events have a source accessible object associated with them (X just gained focus, X was just selected, X's value just changed, etc.). In that case, the presentation/none role is ignored as an author error since the browse can't help but emit the events. |
Joseph, I hope Amelia or Rich jumps in on what is supposed to happen with events. We may not want focus on the larger non visible to a sighed user object and
Watson, IBM, W3C IBM Watson Watson Release Management and Quality From: Joseph Scheuhammer notifications@github.com
Two things: First, what @joanmarie has uncovered in her research is that Secondly, the magic hammer is not absolute when it comes to events. — |
So... There seem to be a number of issues (some bigger than others). @fredesch: Do you agree that the magic-hammer behavior you need for SVG accessibility is not 100% clear from the text in the SVG AAM? If so, perhaps it would make sense to remedy that specific problem within the SVG AAM, namely:
That won't fix everything being discussed here, but I think it will get us closer to the goal of implementors knowing what is expected when they encounter an SVG element with a presentational role and an aria-label AKA the magic hammer. |
Joanie, We will discuss issues you and Joseph raise at the next SVG A11Y TK The testable statements in the wiki are not yet vetted, but feel free to
Watson, IBM, W3C IBM Watson Watson Release Management and Quality From: Joanmarie notifications@github.com So... There seem to be a number of issues (some bigger than others). @fredesch: Do you agree that the magic-hammer behavior you need for SVG
That won't fix everything being discussed here, but I think it will get us — |
How do you think I'm finding the issues I'm raising? ;) ;) While I fully realize your statements are not vetted and are subject to change, they are extremely handy. :) I've made several local WebKit "Layout Tests" with the assertions there. These automated tests run in a couple of seconds and tell me what all is failing. From there, I debug WebKit and either fix the bug (locally at the moment) or start reading your spec and opening issues like this one. :) Once your group has consensus and I have proposed fixes for everything, I'll open a bug upstream (in the WebKit issue tracker) and ping you. |
So, fred, ARIA has error handling whereas if you have, on an element, aria-label="foo" and role="none" that is an error condition and it appears in the tree because must decide in or out. In this case we believe the label but ignore the role. However, there is is a situation in SVG where certain elements must be never be mapped and we need to define these exceptions like . We need to allude to that in the spec. We need to create an issue for this. and we need an issue tracker for the SVG-AAM. |
I also opened an issue in tracker to deal with the ARIA spec side of things. Because right now, if SVG's AAM adds text for the magic hammer (fine with me), it will be in direct conflict with the spec (not so fine). So we should add some brief text to the spec saying something which boils down to "check the AAM for the host language for any exceptions" (but properly worded). |
SVG a11y task force wants the golden hammer. Consensus is authors need a easy to understand way to exclude stuff from the accessibility tree and role none/role presentation is the clear way. If an author includes an aria property like aria-label which would normally include the element in the accessibility tree and set role none, then we consider that an error condition - as there is no way to resolve what the author really wants. |
We really need a change in Core AAM. As I currently read it, the "exclude" behavior takes precedence over the "include" behavior because the first sentence of Section 5.1.2, Including Elements is
The excluding-elements rules say exclude if the role is presentation or none, so that takes precedence over the must-include for elements with a global WAI-ARIA attribute. That said, I would like it to be more clear. I think the easiest change would be to modify the bullet point (in section 5.1.2 of the Core-AAM) that currently says:
To instead say
I'll be updating the SVG-AAM with this interpretation in mind. |
From Joseph Scheuhammer (@klown) on the mailing list: I don't believe that is consistent with the specification of the I filed ISSUE-708 about this in Mar 2015 . There have been
In summary, the core-aam inclusion rules need changes, but those changes |
[Copying over some more mailing list discussion so we have it all in one thread for reference] From @fredesch on 4 March 2016: Joseph, For SVG it is imperative that an author be able to mark an element with the role none or presentation and know that the element will not appear in the accessibility tree. SVG is too messy to force authors and authoring tools to work through anything but the simplest rule. Case 1: A group element is only present in the SVG to pass along common attributes to their children. For instance you may group text elements for labeling items around a circle, by their anchor location. This group element has no semantic meaning. This is a common use for group elements as it makes the SVG smaller and makes it easier to edit reused styles. This group element should not be included in the accessibility tree. Case 2: A group element has semantic meaning and the parent/child relationship is significant. An example, would be a group element representing a stack in a stacked bar chart. The children of the stack group element are the individual bars that make up the stack and the stack group element may contain stack level information, for example the total value (height) of the stack. A good chart navigation tool would let a user visit the stack and the user could either visit the individual bars in the stack or move to another stack. Without using stack level objects in the accessibility tree the concept of a stacked chart would be lost. This group element should appear in the accessibility tree. Programmatically, both Case 1 and Case 2 group elements may look similar. Authoring tools (few developer hand edit SVG) need to provide a straight forward way to disallow elements from being in the accessibility tree. Authors need a straight forward way of to disallow elements from being in the accessibility tree. Without an author friendly way of identifying case 1 from case 2 the underlying concept of the graphic can be lost. The SVG accessibility task force decided that using a role of none or presentation was the golden hammer that developers and authoring tools need to exclude elements from the accessibility tree. Amelia is add the changes in. If we need to change the ARIA spec lets change it. From myself later on 4 March 2016: I have to agree with Joseph's concerns. This isn't a matter of whether author's should be able to mark presentational elements as presentation. It's a question of how user agents and ATs should behave when the information provided by the author is inconsistent. In that case, I would always argue for the user agent to serve the user, presenting as much information as possible. Interactive elements need to be in the accessibility tree. If not, assistive technologies cannot effectively work as enhancements to the underlying browser interface, with input and output working independently from the DOM. If an author places The behavior should be the same when an element is given ARIA attributes but either explicitly or by default has a role of none. Treat it as a generic object, unknown role or no specific role, but ensure that the information that was provided is available to the user. It can still be reported as an authoring error in a validation tool, but we need a useful behavior for user agents. The examples Fred provided, of wanting to have grouping elements that are transparent to assistive tech, are never something you would want to toggle on or off by changing a role. (And roles should never be used to toggle state, anyway.) I can see no good reason why someone would provide aria-label or other ARIA attributes on an element that should be ignored. The logical assumption is that the author did not understand the normal impact of
So I would suggest the following series of priorities for the Core-AAM guidelines on whether to include an element in the accessibility tree:
Host languages and/or their mapping specs would therefore need to clearly define:
A final sticky issue, however, is what to do about other events. Unlike keyboard focus, there isn't always a clear association between an event and the semantically relevant element. Event listeners can be added once to a parent element to collect events from many child elements; without examining the script, you don't know whether the action distinguishes between the individual element targets. The ARIA event mapping guide requires accessibility API events to be fired for changes to text content, but that doesn't mean every span needs to watch for text mutations: these can be reported by the nearest ancestor element that is included in the accessibility tree. The inclusion criteria "Elements that may fire an accessibility API event" is therefore problematic. Whether or not an element may fire an accessibility API event depends on whether or not it is included in the accessibility tree. Looking through the accessibility API event list, I think most of the events would either be covered by the test for a valid role, or could be safely bubbled up to the nearest ancestor in the accessibility tree. I would therefore remove that inclusion criteria altogether. I'm going to be cleaning up other parts of the SVG-AAM this weekend, but I'll have to hold off making too many changes on these sections until there is a group resolution on how to proceed for the Core-AAM. ~Amelia |
Cleaning up old issues. The section "Presentational Roles Conflict Resolution" in ARIA 1.1 sums up the definitive rules that resulted from this discussion. That section is referenced from the "Excluding Elements from the Accessibility Tree " section in CORE-AAM. The "Excluding Elements from the Accessibility Tree" needs to be updated to reference it directly in the informative note (the normative text is a reference to CORE-AAM), but I currently have an editor's note on that point:
So I think the Editor's note is enough to make sure it doesn't get forgotten; I'll clean it up next time I do some edits. |
In the SVG-AAM's 5.1.1 Excluding Elements from the Accessibility Tree there is the following note text:
One should, of course, consult the CORE-AAM as the good note states. But a reader of the above text couldn't be blamed all that severely if they read the above note text and concluded that given
there should be no accessible object.
If one consults the CORE-AAM for the normative text, 5.1.1 Excluding Elements from the Accessibility Tree, they would find something quite similar:
So unless the ARIA spec defines a rule for
none
/presentation
that says otherwise, it would seem that therect
element in the example above does indeed need to be excluded.There's a lot of text in the ARIA spec regarding the presentation role, but for the question at hand this statement seems to be the most relevant:
(emphasis added)
The
aria-label
attribute is global. So then therect
element in the example above would need to be exposed after all (right?).I mention all of this for a couple of reasons:
aria-label
, implementors would not have to do all of the work above I just did. ;) Plus it would be clear and eliminate lingering doubts (e.g. an implementor might think, "A shape element whose role has been explicitly set tonone
is surely decorative and useless with respect to accessibility.")The text was updated successfully, but these errors were encountered: