Bug 155554 - AX: attributes to retrieve focusable and editable ancestors
Summary: AX: attributes to retrieve focusable and editable ancestors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-16 12:23 PDT by Doug Russell
Modified: 2016-03-17 15:43 PDT (History)
12 users (show)

See Also:


Attachments
Patch (14.53 KB, patch)
2016-03-16 12:41 PDT, Doug Russell
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (924.39 KB, application/zip)
2016-03-16 13:25 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.02 MB, application/zip)
2016-03-16 13:29 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-yosemite (994.16 KB, application/zip)
2016-03-16 13:48 PDT, Build Bot
no flags Details
Patch (256.96 KB, patch)
2016-03-16 17:12 PDT, Doug Russell
no flags Details | Formatted Diff | Diff
Patch (256.47 KB, patch)
2016-03-17 13:51 PDT, Doug Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Russell 2016-03-16 12:23:58 PDT
Add a simple way to retrieve the focusable or editable element containing an element (possibly that element itself) in order to better make decisions about notifying AT users about focus changes.
Comment 1 Radar WebKit Bug Importer 2016-03-16 12:24:43 PDT
<rdar://problem/25198311>
Comment 2 Doug Russell 2016-03-16 12:41:07 PDT
Created attachment 274211 [details]
Patch
Comment 3 Build Bot 2016-03-16 13:25:15 PDT
Comment on attachment 274211 [details]
Patch

Attachment 274211 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/990314

New failing tests:
accessibility/plugin.html
accessibility/mac/bounds-for-range.html
accessibility/image-link.html
accessibility/table-attributes.html
accessibility/mac/internal-link-anchors.html
accessibility/mac/document-links.html
accessibility/table-sections.html
accessibility/math-multiscript-attributes.html
accessibility/table-one-cell.html
accessibility/table-detection.html
accessibility/table-cells.html
accessibility/image-map2.html
accessibility/table-cell-spans.html
accessibility/table-with-rules.html
accessibility/transformed-element.html
accessibility/mac/aria-columnrowheaders.html
accessibility/internal-link-anchors2.html
accessibility/lists.html
Comment 4 Build Bot 2016-03-16 13:25:19 PDT
Created attachment 274213 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-03-16 13:29:23 PDT
Comment on attachment 274211 [details]
Patch

Attachment 274211 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/990326

New failing tests:
accessibility/plugin.html
accessibility/mac/bounds-for-range.html
accessibility/image-link.html
accessibility/table-attributes.html
accessibility/mac/internal-link-anchors.html
accessibility/mac/document-links.html
accessibility/table-sections.html
accessibility/math-multiscript-attributes.html
accessibility/table-one-cell.html
accessibility/table-detection.html
accessibility/table-cells.html
accessibility/image-map2.html
accessibility/table-cell-spans.html
accessibility/table-with-rules.html
accessibility/transformed-element.html
accessibility/mac/aria-columnrowheaders.html
accessibility/internal-link-anchors2.html
accessibility/lists.html
Comment 6 Build Bot 2016-03-16 13:29:26 PDT
Created attachment 274215 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-03-16 13:48:52 PDT
Comment on attachment 274211 [details]
Patch

Attachment 274211 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/990334

New failing tests:
accessibility/plugin.html
accessibility/mac/bounds-for-range.html
accessibility/image-link.html
accessibility/table-attributes.html
accessibility/mac/internal-link-anchors.html
accessibility/mac/document-links.html
accessibility/table-sections.html
accessibility/math-multiscript-attributes.html
accessibility/table-one-cell.html
accessibility/table-detection.html
accessibility/table-cells.html
accessibility/image-map2.html
accessibility/table-cell-spans.html
accessibility/table-with-rules.html
accessibility/transformed-element.html
accessibility/mac/aria-columnrowheaders.html
accessibility/internal-link-anchors2.html
accessibility/lists.html
Comment 8 Build Bot 2016-03-16 13:48:56 PDT
Created attachment 274218 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Doug Russell 2016-03-16 17:12:10 PDT
Created attachment 274244 [details]
Patch
Comment 10 chris fleizach 2016-03-17 01:06:56 PDT
(In reply to comment #9)
> Created attachment 274244 [details]
> Patch

what is the purpose of this patch? what will it be used for?

this looks like it also add a lot of extra cycles to web retrieval, if these are now three new attributes on every element, that will run up the parent chain independently for every call
Comment 11 Doug Russell 2016-03-17 10:28:16 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > Created attachment 274244 [details]
> > Patch
> 
> what is the purpose of this patch? what will it be used for?
> 
> this looks like it also add a lot of extra cycles to web retrieval, if these
> are now three new attributes on every element, that will run up the parent
> chain independently for every call

The purpose is to simplify the logic that decides if a focus change should be alerted to a user or if we've simply moved between focusable subelements.
Comment 12 chris fleizach 2016-03-17 10:29:29 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > Created attachment 274244 [details]
> > > Patch
> > 
> > what is the purpose of this patch? what will it be used for?
> > 
> > this looks like it also add a lot of extra cycles to web retrieval, if these
> > are now three new attributes on every element, that will run up the parent
> > chain independently for every call
> 
> The purpose is to simplify the logic that decides if a focus change should
> be alerted to a user or if we've simply moved between focusable subelements.

and that is happening inside VoiceOver now?

Will VO fetch these on demand or automatically for all elements?
Comment 13 Doug Russell 2016-03-17 10:32:18 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > (In reply to comment #9)
> > > > Created attachment 274244 [details]
> > > > Patch
> > > 
> > > what is the purpose of this patch? what will it be used for?
> > > 
> > > this looks like it also add a lot of extra cycles to web retrieval, if these
> > > are now three new attributes on every element, that will run up the parent
> > > chain independently for every call
> > 
> > The purpose is to simplify the logic that decides if a focus change should
> > be alerted to a user or if we've simply moved between focusable subelements.
> 
> and that is happening inside VoiceOver now?

VoiceOver currently uses some unreliable heuristics based on roles and frames that this is meant to replace.

> 
> Will VO fetch these on demand or automatically for all elements?

Only on demand.

I think the only place where this is adding overhead is in the list of supported attributes growing by three entries and a couple more if statements in accessibilityAttributeValue
Comment 14 chris fleizach 2016-03-17 12:14:20 PDT
Comment on attachment 274244 [details]
Patch

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

some review comments inside

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:253
> +    if (canSetFocusAttribute())

if you start your loop with "this" you can avoid this extra bit of code with no extra cost

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:268
> +    if (isTextControl())

ditto

> Source/WebCore/accessibility/AccessibilityObject.h:1043
>      

these seem like they can all go in AccessibilityObject.cpp and then they don't have to be virtual

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3335
> +    if (!m_object->isWebArea()) {

if its called on WebArea, it will just end up returning nil right? that seems ok doesn't it
Comment 15 Doug Russell 2016-03-17 12:16:35 PDT
(In reply to comment #14)
> Comment on attachment 274244 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274244&action=review
> 
> some review comments inside
> 
> > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:253
> > +    if (canSetFocusAttribute())
> 
> if you start your loop with "this" you can avoid this extra bit of code with
> no extra cost

Will do

> 
> > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:268
> > +    if (isTextControl())
> 
> ditto

Will do

> 
> > Source/WebCore/accessibility/AccessibilityObject.h:1043
> >      
> 
> these seem like they can all go in AccessibilityObject.cpp and then they
> don't have to be virtual

I'll see if I can do that.

> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3335
> > +    if (!m_object->isWebArea()) {
> 
> if its called on WebArea, it will just end up returning nil right? that
> seems ok doesn't it

Correct. I can remove that check.
Comment 16 Doug Russell 2016-03-17 13:51:52 PDT
Created attachment 274323 [details]
Patch
Comment 17 WebKit Commit Bot 2016-03-17 15:43:27 PDT
Comment on attachment 274323 [details]
Patch

Clearing flags on attachment: 274323

Committed r198356: <http://trac.webkit.org/changeset/198356>
Comment 18 WebKit Commit Bot 2016-03-17 15:43:32 PDT
All reviewed patches have been landed.  Closing bug.