Bug 136751
Summary: | AX: img alt not included in label computation for form elements | ||
---|---|---|---|
Product: | WebKit | Reporter: | James Craig <jcraig> |
Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
James Craig
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)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
James Craig
<rdar://problem/18309326>
James Craig
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.