Bug 161118

Summary: AX: VoiceOver on iOS ignores aria-checked on menuitemradio and menuitemcheckbox
Product: WebKit Reporter: Nan Wang <n_wang>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, mario, n_wang, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
patch
none
patch none

Description Nan Wang 2016-08-23 16:47:44 PDT
VO for macOS speaks "checked" appropriately. iOS does not.

<rdar://problem/27975170>
Comment 1 Nan Wang 2016-08-23 16:50:37 PDT
Created attachment 286806 [details]
Patch
Comment 2 chris fleizach 2016-08-23 17:32:03 PDT
Comment on attachment 286806 [details]
Patch

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1250
> +    if (m_object->isCheckboxOrRadio() || m_object->isMenuItem()) {

does this also have the toggleTrait? if not, then VO would probably speak "1" as the value instead of off/on
Comment 3 Nan Wang 2016-08-23 18:14:26 PDT
Comment on attachment 286806 [details]
Patch

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

>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1250
>> +    if (m_object->isCheckboxOrRadio() || m_object->isMenuItem()) {
> 
> does this also have the toggleTrait? if not, then VO would probably speak "1" as the value instead of off/on

This is same as how we expose the value on Mac. But I can double check for the traits.
Comment 4 chris fleizach 2016-08-23 21:10:28 PDT
Yea iOS is different
If we use the 0,1,2 values we need to make sure that object is using the toggle trait

(In reply to comment #3)
> Comment on attachment 286806 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=286806&action=review
> 
> >> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1250
> >> +    if (m_object->isCheckboxOrRadio() || m_object->isMenuItem()) {
> > 
> > does this also have the toggleTrait? if not, then VO would probably speak "1" as the value instead of off/on
> 
> This is same as how we expose the value on Mac. But I can double check for
> the traits.
Comment 5 Nan Wang 2016-08-24 12:02:08 PDT
Created attachment 286878 [details]
patch

Added toggle trait
Comment 6 chris fleizach 2016-08-24 14:42:24 PDT
Comment on attachment 286878 [details]
patch

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1252
> +    if (m_object->isCheckboxOrRadio() || m_object->roleValue() == MenuItemCheckboxRole || m_object->roleValue() == MenuItemRadioRole) {

we should put the roleValue into a local variable probably, otherwise looks good
Comment 7 Nan Wang 2016-08-24 14:51:37 PDT
Created attachment 286895 [details]
patch

Update from review
Comment 8 WebKit Commit Bot 2016-08-24 15:27:01 PDT
Comment on attachment 286895 [details]
patch

Clearing flags on attachment: 286895

Committed r204938: <http://trac.webkit.org/changeset/204938>
Comment 9 WebKit Commit Bot 2016-08-24 15:27:06 PDT
All reviewed patches have been landed.  Closing bug.