Bug 136751 - AX: img alt not included in label computation for form elements
Summary: AX: img alt not included in label computation for form elements
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-09-11 12:27 PDT by James Craig
Modified: 2014-10-13 12:45 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2014-09-11 12:27:42 PDT
Bryan Garaventa writes

* SUMMARY
When a form field is explicitly labelled using a Label element with matching For and ID attributes, and the Label includes an IMG tag that includes alternative text, the accessible name on the form field object is not set to match the alternative text of the IMG.

Example:

<label for="opt1">
<input id="opt1" type="checkbox" data-price="15.94">
<img title="A Short History of Nearly Everything by Bill Bryson ($15.94)" alt="A Short History of Nearly Everything by Bill Bryson ($15.94)" src="img/AShortHistoryOfNearlyEverything.jpg">
</label>

Live demo:
http://whatsock.com/tsg/Coding%20Arena/Web%20Chat%20and%20Dynamic%20Message%20Announcement/Dynamic%20Message%20Announcement/demo.htm


(Workaround is to use @aria-labelledby)
Comment 1 James Craig 2014-09-11 12:28:15 PDT
<rdar://problem/18309326>
Comment 2 James Craig 2014-10-13 12:45:08 PDT
Looks like WebKit is exposing the right thing: The AXCheckbox has an AXTitleUIElement reference to an AXGroup that includes both the original checkbox and an AXImage with the proper AXDescription string.

Closing WebKit tracker issue b/c this is now tracked as a VO issue in Radar.