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...
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-09-26 18:20 PDT by Nan Wang
Modified: 2016-09-29 08:15 PDT (History)
11 users (show)

See Also:


Attachments
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
<rdar://problem/28486923>
Comment 2 Nan Wang 2016-09-26 18:21:01 PDT
<rdar://problem/26638734>
Comment 3 Nan Wang 2016-09-26 18:26:17 PDT
Created attachment 289898 [details]
patch
Comment 4 chris fleizach 2016-09-27 11:02:17 PDT
Comment on attachment 289898 [details]
patch

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]
patch

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]
patch

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.