Bug 163419 - AX: [Mac] roleDescription for AXTextField input types
Summary: AX: [Mac] roleDescription for AXTextField input types
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-10-13 16:50 PDT by Nan Wang
Modified: 2016-10-16 23:01 PDT (History)
4 users (show)

See Also:


Attachments
patch (11.96 KB, patch)
2016-10-13 16:56 PDT, Nan Wang
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (887.75 KB, application/zip)
2016-10-13 17:40 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-yosemite (1.69 MB, application/zip)
2016-10-13 17:52 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.07 MB, application/zip)
2016-10-13 18:10 PDT, Build Bot
no flags Details
patch (10.19 KB, patch)
2016-10-13 19:04 PDT, Nan Wang
darin: review+
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-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