Bug 152237 - AX: iOS: Text field variations do not have the correct traits
Summary: AX: iOS: Text field variations do not have the correct traits
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Normal
Assignee: chris fleizach
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-13 18:05 PST by chris fleizach
Modified: 2015-12-14 13:13 PST (History)
9 users (show)

See Also:


Attachments
patch (15.55 KB, patch)
2015-12-13 20:16 PST, chris fleizach
mario: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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