Bug 163419

Summary: AX: [Mac] roleDescription for AXTextField input types
Product: WebKit Reporter: Nan Wang <n_wang>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, n_wang, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite
none
Archive of layout-test-results from ews116 for mac-yosemite
none
Archive of layout-test-results from ews105 for mac-yosemite-wk2
none
patch darin: review+

Description Nan Wang 2016-10-13 16:50:05 PDT
The input types could be mapped more expressively for help ATs to differenciates these fields from other text fields.
Comment 1 Radar WebKit Bug Importer 2016-10-13 16:50:31 PDT
<rdar://problem/28766192>
Comment 2 Nan Wang 2016-10-13 16:56:59 PDT
Created attachment 291540 [details]
patch
Comment 3 Build Bot 2016-10-13 17:40:39 PDT
Comment on attachment 291540 [details]
patch

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

New failing tests:
accessibility/roles-exposed.html
Comment 4 Build Bot 2016-10-13 17:40:41 PDT
Created attachment 291546 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-10-13 17:52:10 PDT
Comment on attachment 291540 [details]
patch

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

New failing tests:
accessibility/roles-exposed.html
Comment 6 Build Bot 2016-10-13 17:52:13 PDT
Created attachment 291548 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-10-13 18:10:24 PDT
Comment on attachment 291540 [details]
patch

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

New failing tests:
accessibility/roles-exposed.html
Comment 8 Build Bot 2016-10-13 18:10:26 PDT
Created attachment 291550 [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 9 Nan Wang 2016-10-13 19:04:07 PDT
Created attachment 291556 [details]
patch

Fixed test failure.
Comment 10 Darin Adler 2016-10-15 18:27:11 PDT
Comment on attachment 291556 [details]
patch

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

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2520
> +        Node* node = m_object->node();

Slightly better to use auto:

    auto* node = m_object->node();

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2521
> +        if (node && is<HTMLInputElement>(*node)) {

The is<> function handles null checks if you pass it a pointer:

    if (is<HTMLInputElement>(node)) {

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2522
> +            HTMLInputElement& input = downcast<HTMLInputElement>(*node);

Best style is to not repeat the type:

    auto& input = downcast<HTMLInputElement>(*node);

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2531
> +            const AtomicString& type = m_object->getAttribute(typeAttr);

Should write:

    auto& type = input.attributeWithoutSynchronization(typeAttr);

Instead of going back to the accessibility object, now that we know this is an input element.
Comment 11 Nan Wang 2016-10-16 23:00:59 PDT
Committed r207401: <http://trac.webkit.org/changeset/207401>
Comment 12 Nan Wang 2016-10-16 23:01:27 PDT
committed with changes