Bug 162586 - AX: Meter: [Mac] Content in label element should be used as AXTitle or AXDescription
Summary: AX: Meter: [Mac] Content in label element should be used as AXTitle or AXDesc...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2016-09-26 18:20 PDT by Nan Wang
Modified: 2016-09-29 08:15 PDT (History)
11 users (show)

See Also:

patch (7.34 KB, patch)
2016-09-26 18:26 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (12.49 KB, patch)
2016-09-27 12:56 PDT, Nan Wang
no flags 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-09-26 18:20:24 PDT
When an meter element is associated (id/for) with, or wrapped inside a label element, the AXTitle and AXDescription is unaffected by the content in the label element.
Comment 1 Radar WebKit Bug Importer 2016-09-26 18:20:38 PDT
Comment 2 Nan Wang 2016-09-26 18:21:01 PDT
Comment 3 Nan Wang 2016-09-26 18:26:17 PDT
Created attachment 289898 [details]
Comment 4 chris fleizach 2016-09-27 11:02:17 PDT
Comment on attachment 289898 [details]

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

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1240
> +    String innerText = label->innerText();

seems like we should do the work to fetch this data if aria_Label is going to be used

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1243
> +    if (!ariaLabel.isEmpty())

what if aria-labelledby is used on the label element
Comment 5 Nan Wang 2016-09-27 12:56:49 PDT
Created attachment 289999 [details]

update from review.
- Taken care of aria-labelledby on label elements
- Added test cases
Comment 6 WebKit Commit Bot 2016-09-29 08:15:27 PDT
Comment on attachment 289999 [details]

Clearing flags on attachment: 289999

Committed r206581: <http://trac.webkit.org/changeset/206581>
Comment 7 WebKit Commit Bot 2016-09-29 08:15:32 PDT
All reviewed patches have been landed.  Closing bug.