Bug 152237

Summary: AX: iOS: Text field variations do not have the correct traits
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, commit-queue, dmazzoni, jcraig, jdiggs, mario, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch mario: review+

Description chris fleizach 2015-12-13 18:05:52 PST
Search fields are not using the search field trait
<textarea>'s are not using the text area trait

This is iOS only

<rdar://problem/23818981>
Comment 1 chris fleizach 2015-12-13 20:16:05 PST
Created attachment 267279 [details]
patch
Comment 2 Mario Sanchez Prada 2015-12-14 01:58:05 PST
Comment on attachment 267279 [details]
patch

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

Looks good to me, just pointed out a couple of small issues below, for consideration before landing.

> Source/WebCore/ChangeLog:32
> +2015-10-19  Chris Fleizach  <cfleizach@apple.com>
> +
> +        AX: CrashTracer: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::AccessibilityTable::tableElement const + 116
> +        https://bugs.webkit.org/show_bug.cgi?id=150349
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        The crash point for this bug says that the parentElement of the firstBody is garbage when it's accessed. 
> +        Unfortunately, I could not reproduce this in-situ or with a test. 
> +        So my speculative solution is to recalculate those body elements to ensure that they're valid before we access.
> +
> +        * accessibility/AccessibilityTable.cpp:
> +        (WebCore::AccessibilityTable::tableElement):
> +        (WebCore::AccessibilityTable::isDataTable):
> +

Looks like this block is a leftover from a different patch

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:276
> +- (uint64_t)_axSearchFieldTraits { return (1 << 23); }
> +- (uint64_t)_axTextAreaTraits { return (1 << 24); }

Unless I'm missing something, I think these should be named _axSearchFieldTrait and _axSearchFieldTrait ("Trait", instead of "Traits") for consistency

> Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm:87
> +- (UIAccessibilityTraits)_axTextAreaTraits;
> +- (UIAccessibilityTraits)_axSearchFieldTraits;

Consistency nit again: _axTextAreaTrait and _axTextAreaTrait here too
Comment 3 chris fleizach 2015-12-14 08:48:21 PST
Comment on attachment 267279 [details]
patch

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

>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:276
>> +- (uint64_t)_axTextAreaTraits { return (1 << 24); }
> 
> Unless I'm missing something, I think these should be named _axSearchFieldTrait and _axSearchFieldTrait ("Trait", instead of "Traits") for consistency

correct. thanks
Comment 4 chris fleizach 2015-12-14 13:13:15 PST
http://trac.webkit.org/changeset/194054