WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155481
AX: Expose pointers to SVG elements referenced by aria-labelledby
https://bugs.webkit.org/show_bug.cgi?id=155481
Summary
AX: Expose pointers to SVG elements referenced by aria-labelledby
Joanmarie Diggs
Reported
2016-03-14 18:46:56 PDT
At least in the case of ATK, elements referenced by aria-labelledby should be exposed via ATK_RELATION_LABELLED_BY. This is consistent with the Core AAM spec, and is also something that will be tested in the implementations of the SVG AAM. We are currently only exposing elements referenced by aria-labelledby via the accessible name calculation.
Attachments
Patch
(16.74 KB, patch)
2016-03-14 18:53 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-yosemite
(764.88 KB, application/zip)
2016-03-14 19:39 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews113 for mac-yosemite
(874.42 KB, application/zip)
2016-03-14 19:53 PDT
,
Build Bot
no flags
Details
Patch
(16.56 KB, patch)
2016-03-14 20:08 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Patch
(32.55 KB, patch)
2016-03-15 15:19 PDT
,
Joanmarie Diggs
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-03-14 18:47:27 PDT
<
rdar://problem/25158925
>
Joanmarie Diggs
Comment 2
2016-03-14 18:53:33 PDT
Created
attachment 274067
[details]
Patch
Joanmarie Diggs
Comment 3
2016-03-14 19:01:10 PDT
Chris: The attached patch only does the exposure for ATK, though I did update the layout test for the Mac which currently indicates the elements are not being exposed via AXTitleUIElement. According to the current expectations of the SVG Accessibility Task Force [1], there are a number of instances in which the elements should be exposed via AXTitleUIElement. Could you please either confirm that their expectations are correct (in which case I'll do a new patch that also handles exposure for the Mac), or let me know that they are wrong (in which case, I'll pass that along to them)? Thanks! [1]
https://www.w3.org/wiki/SVG_Accessibility/Testing/Test_Assertions_with_Tables
Build Bot
Comment 4
2016-03-14 19:39:17 PDT
Comment on
attachment 274067
[details]
Patch
Attachment 274067
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/980045
New failing tests: accessibility/w3c-svg-name-calculation.html
Build Bot
Comment 5
2016-03-14 19:39:21 PDT
Created
attachment 274069
[details]
Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 6
2016-03-14 19:53:55 PDT
Comment on
attachment 274067
[details]
Patch
Attachment 274067
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/980057
New failing tests: accessibility/w3c-svg-name-calculation.html
Build Bot
Comment 7
2016-03-14 19:53:59 PDT
Created
attachment 274070
[details]
Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Joanmarie Diggs
Comment 8
2016-03-14 20:08:34 PDT
Created
attachment 274071
[details]
Patch
chris fleizach
Comment 9
2016-03-14 23:57:41 PDT
(In reply to
comment #3
)
> Chris: The attached patch only does the exposure for ATK, though I did > update the layout test for the Mac which currently indicates the elements > are not being exposed via AXTitleUIElement. > > According to the current expectations of the SVG Accessibility Task Force > [1], there are a number of instances in which the elements should be exposed > via AXTitleUIElement. Could you please either confirm that their > expectations are correct (in which case I'll do a new patch that also > handles exposure for the Mac), or let me know that they are wrong (in which > case, I'll pass that along to them)? >
THere has been some talk of exposing labelledby- as elements in title UI Elements, but so far we've just take the string concatenation. We could fix that in the future, but i don't know if i've seen a real world case where it's made a difference yet
> Thanks! > > [1] >
https://www.w3.org/wiki/SVG_Accessibility/Testing/Test_Assertions_with_Tables
chris fleizach
Comment 10
2016-03-15 00:02:29 PDT
Comment on
attachment 274071
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274071&action=review
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1038 > + return !getAttribute(aria_labelledbyAttr).isEmpty() || !getAttribute(aria_labeledbyAttr).isEmpty();
seems like this can move into AXObject.cpp and then it doesn't need to be virtual
> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1045 > + ariaElementsFromAttribute(ariaLabelledBy, aria_labeledbyAttr);
ditto
> Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:256 > + } else if (coreObject->supportsARIALabelledBy()) {
does having a supportsARIALabelledBy method give us any wins here? it seems like directly getting ariaLabelledByElements() will be just as fast when there's nothing there, and faster where there is something
Joanmarie Diggs
Comment 11
2016-03-15 07:41:50 PDT
(In reply to
comment #10
) Thanks for the review! Regarding this:
> does having a supportsARIALabelledBy method give us any wins here? it seems > like directly getting ariaLabelledByElements() will be just as fast when > there's nothing there, and faster where there is something
Makes sense. FWIW, I did it purely to be consistent with what was done for flowto, controls, and describedby without questioning why it was done for the others. Taking a look at them now, do any of them give us any wins? Most seem to be used just by ATK, the exception being supportsARIAFlowTo() (called by AccessibilityObject::supportsARIAAttributes()). But that could easily be replaced with hasAttribute(aria_flowtoAttr). So it seems to me that we might as well remove the supportsFoo() when only used prior to ariaFooElements(). If you agree, I'll do that as part of the revised patch. (In reply to
comment #9
)
> THere has been some talk of exposing labelledby- as elements in title UI > Elements, but so far we've just take the string concatenation. We could fix > that in the future, but i don't know if i've seen a real world case where > it's made a difference yet
The only thing I can think of is possibly eliminating double-presentation of text content. I'll see if I can come up with a test case to prove or disprove that with VoiceOver.
chris fleizach
Comment 12
2016-03-15 09:05:54 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > Thanks for the review! Regarding this: > > > does having a supportsARIALabelledBy method give us any wins here? it seems > > like directly getting ariaLabelledByElements() will be just as fast when > > there's nothing there, and faster where there is something > > Makes sense. FWIW, I did it purely to be consistent with what was done for > flowto, controls, and describedby without questioning why it was done for > the others. > > Taking a look at them now, do any of them give us any wins? Most seem to be > used just by ATK, the exception being supportsARIAFlowTo() (called by > AccessibilityObject::supportsARIAAttributes()). But that could easily be > replaced with hasAttribute(aria_flowtoAttr). So it seems to me that we might > as well remove the supportsFoo() when only used prior to ariaFooElements(). > If you agree, I'll do that as part of the revised patch.
I know there are some cases that I think gate the inclusion of attributes for the mac platform, so I guess I'll need to see the patch, but I did just check out aria-flowto and that seems like a ripe candidate indeed
> > (In reply to
comment #9
) > > > THere has been some talk of exposing labelledby- as elements in title UI > > Elements, but so far we've just take the string concatenation. We could fix > > that in the future, but i don't know if i've seen a real world case where > > it's made a difference yet > > The only thing I can think of is possibly eliminating double-presentation of > text content. I'll see if I can come up with a test case to prove or > disprove that with VoiceOver.
Joanmarie Diggs
Comment 13
2016-03-15 09:57:29 PDT
Comment on
attachment 274071
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274071&action=review
>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1038 >> + return !getAttribute(aria_labelledbyAttr).isEmpty() || !getAttribute(aria_labeledbyAttr).isEmpty(); > > seems like this can move into AXObject.cpp and then it doesn't need to be virtual
On this one, we agree the method is not needed at all, but.... (to be continued)
>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1045 >> + ariaElementsFromAttribute(ariaLabelledBy, aria_labeledbyAttr); > > ditto
(continuation) To confirm: Move all the ariaFooElements() out of AccessibilityRenderObject and into AccessibilityObject? Are there AccessibilityObject items which will not be AccessibilityRenderObject instances and while have aria-{labelledby,describedby,flowto,controls,owns}?
chris fleizach
Comment 14
2016-03-15 10:00:16 PDT
(In reply to
comment #13
)
> Comment on
attachment 274071
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=274071&action=review
> > >> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1038 > >> + return !getAttribute(aria_labelledbyAttr).isEmpty() || !getAttribute(aria_labeledbyAttr).isEmpty(); > > > > seems like this can move into AXObject.cpp and then it doesn't need to be virtual > > On this one, we agree the method is not needed at all, but.... (to be > continued) > > >> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1045 > >> + ariaElementsFromAttribute(ariaLabelledBy, aria_labeledbyAttr); > > > > ditto > > (continuation) To confirm: Move all the ariaFooElements() out of > AccessibilityRenderObject and into AccessibilityObject? Are there > AccessibilityObject items which will not be AccessibilityRenderObject > instances and while have aria-{labelledby,describedby,flowto,controls,owns}?
I guess its always possible there will be a fake element or a Node only element that has these attributes. Plus by virtue of being not virtual, it should be slightly faster
Joanmarie Diggs
Comment 15
2016-03-15 15:19:25 PDT
Created
attachment 274140
[details]
Patch
Joanmarie Diggs
Comment 16
2016-03-15 17:08:02 PDT
Comment on
attachment 274140
[details]
Patch Chris, I believe I addressed everything: * All of the supportsARIAFoo() methods with corresponding ariaFooElements() method seem unneeded EXCEPT supportsARIAOwns() which the Mac wrapper calls in additionalAccessibilityAttributeNames(). I've removed the unneeded ones, which turned out to also be used by the inspector in the same fashion as the ATK wrapper. * All of the ariaFooElements() methods have been moved from AccessibilityRenderObject to AccessibilityObject. * I tried to come up with a real-world use case in which VoiceOver was double-speaking text referenced by aria-labelledby in SVG. I failed. :) I'll check with the SVG Accessibility Task Force to see if verifying implementation via the name computation will be sufficient for CR testing. I also did a bit more cleanup in the ATK Wrapper's relation-set construction. Please review when you have a chance. Thanks again!
WebKit Commit Bot
Comment 17
2016-03-15 18:45:43 PDT
Comment on
attachment 274140
[details]
Patch Clearing flags on attachment: 274140 Committed
r198254
: <
http://trac.webkit.org/changeset/198254
>
WebKit Commit Bot
Comment 18
2016-03-15 18:45:50 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug