Bug 62357 - AX: Consider TitleUIElementsAttribute (plural, not TitleUIElementAttribute) to support multiple IDREFs in aria-labelledby
Summary: AX: Consider TitleUIElementsAttribute (plural, not TitleUIElementAttribute) t...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-06-08 23:17 PDT by Alice Boxhall
Modified: 2013-12-20 11:46 PST (History)
5 users (show)

See Also:


Attachments
Patch (10.92 KB, patch)
2011-06-09 18:45 PDT, Alice Boxhall
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Boxhall 2011-06-08 23:17:42 PDT
Bug 61995 has some discussion on the best way to expose aria-labelledby, with one suggestion being that where possible, it should be exposed via TitleUIElement.

I've hacked together a (very hacky) change to experiment with this.
Comment 1 Alice Boxhall 2011-06-09 18:45:26 PDT
Created attachment 96685 [details]
Patch
Comment 2 chris fleizach 2011-06-13 15:21:35 PDT
The problem with this is that TitleUIElementAttribute expects only one element, whereas aria-labelledby often returns many elements.

We really need a TitleUIElementsAttribute before we could make this change
Comment 3 Alice Boxhall 2011-06-13 16:54:32 PDT
This is obviously just exploratory code; I wanted to see what would happen if we returned _something_ for TitleUIElement.

I'm not sure how frequent the case is where aria-labelledby returns many elements, but I thought it might be worth considering returning the sole value as a TitleUIElement in the case where there was only one.

However, I notice this still doesn't convince VoiceOver to make the parent DIV ("banana" in the test on bug 61995) show up in the accessibility hierarchy. Chris, do you know whether this is a bug? It seems that VoiceOver (or the Mac Accessibility framework?) will only place something in the accessibility hierarchy if it has a Description property.
Comment 4 chris fleizach 2011-06-13 16:57:05 PDT
(In reply to comment #3)
> This is obviously just exploratory code; I wanted to see what would happen if we returned _something_ for TitleUIElement.
> 
> I'm not sure how frequent the case is where aria-labelledby returns many elements, but I thought it might be worth considering returning the sole value as a TitleUIElement in the case where there was only one.
> 
> However, I notice this still doesn't convince VoiceOver to make the parent DIV ("banana" in the test on bug 61995) show up in the accessibility hierarchy. Chris, do you know whether this is a bug? It seems that VoiceOver (or the Mac Accessibility framework?) will only place something in the accessibility hierarchy if it has a Description property.

The element that is being returned still needs to NOT be ignored. I suspect in this case the element is ignored, which is why it won't show up in the tree. you could assign a role="group" to the element to make it show up i suppose
Comment 5 Alice Boxhall 2011-06-13 17:00:40 PDT
(In reply to comment #4)
> > However, I notice this still doesn't convince VoiceOver to make the parent DIV ("banana" in the test on bug 61995) show up in the accessibility hierarchy. Chris, do you know whether this is a bug? It seems that VoiceOver (or the Mac Accessibility framework?) will only place something in the accessibility hierarchy if it has a Description property.
> 
> The element that is being returned still needs to NOT be ignored. I suspect in this case the element is ignored, which is why it won't show up in the tree. you could assign a role="group" to the element to make it show up i suppose

Well, in the case on bug 61995, the DIV has a role of "article" and I have debugged through and checked that accessibilityIsIgnored is definitely returning FALSE. Note that in that case, also, there is no difference between the two DIVs other than one has an aria-label property and one has an aria-labelledby property. As aria-label is exposed as a Description, this DIV shows up in the accessibility hierarchy, but since aria-labelledby is (currently) exposed as a Title, that element does not show up.
Comment 6 Eric Seidel (no email) 2011-09-12 15:35:44 PDT
Comment on attachment 96685 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96685&action=review

This patch is clearly not ready for review.

> Source/WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

This will cause the CQ to fail.  You should either replace this with a list of affected tests, or explain why testing is impossible/impractical.

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1356
> +//    const AtomicString& ariaLabelledBy = ariaLabeledByAttribute();
> +//    if (!ariaLabelledBy.isEmpty())
> +//        return ariaLabelledBy;

We don't commit commented out code.

> Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:1032
> +    else if (m_object->isWebArea()) {
>          objectAttributes = webAreaAttrs;
> +    }

Style?
Comment 7 Alice Boxhall 2011-09-12 15:39:04 PDT
Sorry, I didn't intend to submit this for review. As explained earlier on the bug, this is just exploratory code.

Thanks for taking the time to look at it, though.

(In reply to comment #6)
> (From update of attachment 96685 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=96685&action=review
> 
> This patch is clearly not ready for review.
> 
> > Source/WebCore/ChangeLog:8
> > +        No new tests. (OOPS!)
> 
> This will cause the CQ to fail.  You should either replace this with a list of affected tests, or explain why testing is impossible/impractical.
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1356
> > +//    const AtomicString& ariaLabelledBy = ariaLabeledByAttribute();
> > +//    if (!ariaLabelledBy.isEmpty())
> > +//        return ariaLabelledBy;
> 
> We don't commit commented out code.
> 
> > Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm:1032
> > +    else if (m_object->isWebArea()) {
> >          objectAttributes = webAreaAttrs;
> > +    }
> 
> Style?
Comment 8 James Craig 2013-11-18 16:10:59 PST
<rdar://problem/15497749>
Comment 9 Radar WebKit Bug Importer 2013-12-20 11:46:15 PST
<rdar://problem/15710260>