Closed Bug 768296 Opened 12 years ago Closed 12 years ago

Ignore role="presentation" when global ARIA attributes are present or referred by ARIA relationship

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: davidb, Assigned: surkov)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [good first bug][mentor=eitan@monotonous.org][lang=c++][ARIA conformance])

Attachments

(1 file)

For any element with an explicit or inherited role of presentation, user
agents MUST ignore any non-global, role-specific WAI-ARIA states and
properties. However, the user agent MUST always expose global WAI-ARIA
states and properties to accessibility APIs, even if an element has an
explicit or inherited role of presentation.
(In reply to David Bolter [:davidb] from comment #0)
> However, the user agent MUST always expose global WAI-ARIA
> states and properties to accessibility APIs, even if an element has an
> explicit or inherited role of presentation.

it contradicts to ARIA impl guide (http://www.w3.org/WAI/PF/aria-implementation/#exclude_elements2):

"The following elements are not exposed via the accessibility API and user agents MUST NOT include them in the accessibility tree:

    Elements with presentation as the first mappable role in the role attribute string, according to the rules for presentation role defined in Accessible Rich Internet Applications (WAI-ARIA) 1.0 [ARIA]. "
Yep - one of them has to change. Note I'm reporting these as bugs as soon as I receive them (via email).
(In reply to David Bolter [:davidb] from comment #2)
> Yep - one of them has to change. Note I'm reporting these as bugs as soon as
> I receive them (via email).

Personally I report only bugs when I receive reports via emails. Since these bugs is filed by you and you are trustee person then these "bugs" are confusing.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Sigh. Unfortunately this is a CR/508 requirement.

So generally we're being asked to ignore role="presentation" in more cases; even though it is really an author error. (See http://www.w3.org/WAI/PF/aria/states_and_properties#global_states)

Let's fold related bug 768299 into this one.
(This bug currently feels wrong to me)
Summary: Don't bail on global aria attribute processing because of role="presentation" → Ignore role="presentation" when global aria attributes are present.
Text I received:

   When you have a global aria attribute applied to an element with
   role="presentation" treat it as if role="presentation" is not there.
   When you have an element with role="presentation" that is referenced by
   an ARIA relationship from another element treat it as if the
   role="presentation" is not there.
I will add that element that inherit presentational roles like a td from a presentational table also fail when global aria attributes are applied. I just discovered this in the test cases I have created.
(In reply to David Bolter [:davidb] from comment #7)
> Text I received:
> 
>    When you have a global aria attribute applied to an element with
>    role="presentation" treat it as if role="presentation" is not there.
>    When you have an element with role="presentation" that is referenced by
>    an ARIA relationship from another element treat it as if the
>    role="presentation" is not there.

Ah, this is different from original bug summary and makes sense to me.
(In reply to alexander :surkov from comment #9)
> (In reply to David Bolter [:davidb] from comment #7)
> > Text I received:
> > 
> >    When you have a global aria attribute applied to an element with
> >    role="presentation" treat it as if role="presentation" is not there.
> >    When you have an element with role="presentation" that is referenced by
> >    an ARIA relationship from another element treat it as if the
> >    role="presentation" is not there.
> 
> Ah, this is different from original bug summary and makes sense to me.

I'd say it makes about as much sense as "please clean up my mess, and oh by the way please make sure its really fast", but if the spec requires it / existing web stuff depends on it I guess we have to deal :/
Rich, David, should the bug be fixed before the ARIA impl guide is updated?
(In reply to Trevor Saunders (:tbsaunde) from comment #10)

> I'd say it makes about as much sense as "please clean up my mess, and oh by
> the way please make sure its really fast", but if the spec requires it /
> existing web stuff depends on it I guess we have to deal :/

true, web is always a mess
Status: UNCONFIRMED → NEW
Ever confirmed: true
1) add HasUniversalAriaProperty(content) || HasRelatedContent(content) to IsFocusable() check on role="presentation" (http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsAccessibilityService.cpp#1003)
2) add tests to tree/test_aria_presentation.html, for example, for

<div id="airaglobalprop_cnt">
  <div role="presentation" aria-owns="ariaowned">has aria-owns</div>
  <div role="presentation" id="ariaowned>referred by aria-owns</div>
</div>
Whiteboard: [ARIA conformance] → [good first bug][mentor=eitan@monotonous.org][lang=c++][ARIA conformance]
Summary: Ignore role="presentation" when global aria attributes are present. → Ignore role="presentation" when global ARIA attributes are present or referred by ARIA relationship
Attached patch patchSplinter Review
taking it since it's wanted for ARIA testsuite.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #661111 - Flags: review?(trev.saunders)
Comment on attachment 661111 [details] [diff] [review]
patch

Review of attachment 661111 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/base/nsAccessibilityService.cpp
@@ +999,5 @@
>    nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aNode);
> +
> +  // If the element is focusable or global ARIA attribute is applied to it or
> +  // it is referenced by ARIA relationship then treat role="presentation" on
> +  // the element as the role is not there.

nit: I would change this all to something like
// Ignore presentation role in some cases.
Attachment #661111 - Flags: review+
(In reply to David Bolter [:davidb] from comment #15)

> > +  // If the element is focusable or global ARIA attribute is applied to it or
> > +  // it is referenced by ARIA relationship then treat role="presentation" on
> > +  // the element as the role is not there.
> 
> nit: I would change this all to something like
> // Ignore presentation role in some cases.

Ignore seems to be more ambiguous that "is not there". If I'd use ignore then I say ignore completely probably. And I'd prefer to list all cases since methods names aren't all very descriptive for this case.
Comment on attachment 661111 [details] [diff] [review]
patch

David if you steal review then please cancel the existing one.
Attachment #661111 - Flags: review?(trev.saunders)
(In reply to alexander :surkov from comment #17)
> (In reply to David Bolter [:davidb] from comment #15)
> 
> > > +  // If the element is focusable or global ARIA attribute is applied to it or
> > > +  // it is referenced by ARIA relationship then treat role="presentation" on
> > > +  // the element as the role is not there.
> > 
> > nit: I would change this all to something like
> > // Ignore presentation role in some cases.
> 
> Ignore seems to be more ambiguous that "is not there". If I'd use ignore
> then I say ignore completely probably. And I'd prefer to list all cases
> since methods names aren't all very descriptive for this case.

Treat the nit as optional :)

(In reply to alexander :surkov from comment #18)
> Comment on attachment 661111 [details] [diff] [review]
> patch
> 
> David if you steal review then please cancel the existing one.

Sounds good.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2cb646fdccce
Flags: in-testsuite+
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/2cb646fdccce
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: