Closed Bug 442659 Opened 13 years ago Closed 13 years ago
Alt value overrides aria-labelledby text for image based controls
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 When using an element that requires an alt attribute to create an ARIA widget that has an aria-labelledby property, the alt text will be exposed rather than the label text. Reproducible: Always Steps to Reproduce: 1.Use an image based element to create an ARIA widget. Give it an alt value, as well as an aria-labelledby value that points to a different element labelling the widget. Make sure the label text is different than the alt text. 2.example code: <span id="sliderLabel">Volume</span> <input type="image" src="thumb.png" alt="volume, current value = 10%" role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="10" aria-labelledby="sliderLabel" /> Actual Results: When focused, the alt text is exposed as the widget's accessible name In the example code that would be: "volume, current value = 10%" Expected Results: When focused, the text in the element referenced by the 'aria-labelledby' ID should be exposed. In the example code that would be: "Volume"
Status: UNCONFIRMED → NEW
Ever confirmed: true
Prefer label or ARIA label over value, title and others on nsHTMLButtonAccessible::GetName.
Assignee: nobody → marco.zehe
Status: NEW → ASSIGNED
Attachment #327606 - Flags: review?(aaronleventhal)
Comment on attachment 327606 [details] [diff] [review] Patch These days aria-labelledby can be used without a role. So you should change the |if (mRoleMapEntry)| to |if (content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_labelledby))|
Attachment #327606 - Flags: review?(aaronleventhal) → review-
Address Aaron's comments.
Attachment #327610 - Flags: review?(aaronleventhal) → review+
Marco, hope to see mochitest :)
(In reply to comment #4) > Marco, hope to see mochitest :) Yes, will fold a test for this into an over-all testing for aria-labelledby I'm currently preparing. Thanks!
Pushed to mozilla-central in changeset: http://hg.mozilla.org/mozilla-central/index.cgi/rev/4d1a5e9f9e75
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a1pre) Gecko/2008070603 Minefield/3.1a1pre.
Status: RESOLVED → VERIFIED
Target Milestone: mozilla1.9.1 → mozilla1.9.1a1
You need to log in before you can comment on or make changes to this bug.