Bug 162041 - AX: Add accessibility support for details element on iOS
Summary: AX: Add accessibility support for details element on iOS
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-09-15 16:03 PDT by Nan Wang
Modified: 2016-09-19 11:34 PDT (History)
11 users (show)

See Also:


Attachments
patch (10.18 KB, patch)
2016-09-15 16:23 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (17.50 KB, patch)
2016-09-15 18:52 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (17.49 KB, patch)
2016-09-15 20:29 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (17.08 KB, patch)
2016-09-19 10:58 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2016-09-15 16:03:41 PDT
The details/summary elements are poorly supported on iOS.

Issues:
1. There's no expanded/collapsed status announced from VoiceOver.
2. Impossible to navigate through them using VoiceOver. VO cursor is jumping randomly.

<rdar://problem/27914836>
Comment 1 Nan Wang 2016-09-15 16:23:13 PDT
Created attachment 289013 [details]
patch
Comment 2 chris fleizach 2016-09-15 17:34:30 PDT
Comment on attachment 289013 [details]
patch

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1840
> +    for (AccessibilityObject* parent = object; parent; parent = parent->parentObject()) {

can we make a function that takes a lambda for running up the parent chain and returning a match object?
and then replace all such places with that ?

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1871
> +            // webkit.org/b/162041 Taking focus onto elements inside a details node will cause VO focusing onto random items.

why is this the case?
should we put this check inside canSetFocusAttribute() instead
Comment 3 Nan Wang 2016-09-15 17:40:07 PDT
Comment on attachment 289013 [details]
patch

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

Thanks, will address other issues.

>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1871
>> +            // webkit.org/b/162041 Taking focus onto elements inside a details node will cause VO focusing onto random items.
> 
> why is this the case?
> should we put this check inside canSetFocusAttribute() instead

There must be something special with the details element that I haven't had chance to dig into. I think on iOS it's ok to not set focus inside details element when VO tries to focus on it.
Comment 4 Nan Wang 2016-09-15 17:42:30 PDT
Comment on attachment 289013 [details]
patch

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

>>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1871
>>> +            // webkit.org/b/162041 Taking focus onto elements inside a details node will cause VO focusing onto random items.
>> 
>> why is this the case?
>> should we put this check inside canSetFocusAttribute() instead
> 
> There must be something special with the details element that I haven't had chance to dig into. I think on iOS it's ok to not set focus inside details element when VO tries to focus on it.

I put it here because this will only affect iOS.
Comment 5 chris fleizach 2016-09-15 17:54:02 PDT
Comment on attachment 289013 [details]
patch

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

>>>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1871
>>>> +            // webkit.org/b/162041 Taking focus onto elements inside a details node will cause VO focusing onto random items.
>>> 
>>> why is this the case?
>>> should we put this check inside canSetFocusAttribute() instead
>> 
>> There must be something special with the details element that I haven't had chance to dig into. I think on iOS it's ok to not set focus inside details element when VO tries to focus on it.
> 
> I put it here because this will only affect iOS.

ok seems reasonable
Comment 6 Nan Wang 2016-09-15 18:52:46 PDT
Created attachment 289027 [details]
patch

- updated function to take a lambda to search for matched parent object.
Comment 7 Nan Wang 2016-09-15 19:40:15 PDT
Will look into the patch build issue
Comment 8 Nan Wang 2016-09-15 20:29:21 PDT
Created attachment 289029 [details]
patch

Fixed the patch
Comment 9 Nan Wang 2016-09-19 10:58:07 PDT
Created attachment 289241 [details]
patch

Updated style for matchFunc
Comment 10 WebKit Commit Bot 2016-09-19 11:34:33 PDT
Comment on attachment 289241 [details]
patch

Clearing flags on attachment: 289241

Committed r206102: <http://trac.webkit.org/changeset/206102>
Comment 11 WebKit Commit Bot 2016-09-19 11:34:38 PDT
All reviewed patches have been landed.  Closing bug.