Closed Bug 581967 Opened 14 years ago Closed 14 years ago

Give aria-labelledby precedence over aria-label

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: davidb, Assigned: davidb)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached patch patchSplinter Review
This is a spec change to which we should conform. Patch attached.
Attachment #460252 - Flags: review?(surkov.alexander)
Attachment #460252 - Flags: review?(marco.zehe)
Comment on attachment 460252 [details] [diff] [review] patch r=me for both the tests and code.
Attachment #460252 - Flags: review?(marco.zehe) → review+
Comment on attachment 460252 [details] [diff] [review] patch >- // First check for label override via aria-label property > nsAutoString label; >- if (mContent->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_label, >- label)) { >- label.CompressWhitespace(); >- aName = label; >- return NS_OK; >- } >- >- // Second check for label override via aria-labelledby relationship >+ >+ // aria-labelledby now takes precedence over aria-label I would prefer to have comments like we have now. The proposed comment sounds like hg diff between comments :) because nobody cares if previously aria-label was used before aria-labelledby and care about current standard. It makes sense to refer to ARIA implementation guide in comment. Btw, could you put wording from spec because it's not very clear what exactly you fix here.
Sure, I can fix the comments locally. There is no spec change yet, the action to do that was passed only this morning. The request is to have aria-labelledby take precedence. So for example: Example 1: <bar id="b">bear</bar> <foo id="f" aria-label="foo" aria-labelledby="f b" /> The name is supposed to be "foo bear". Example 2: <bar id="b">bear</bar> <foo id="f" aria-label="foo" aria-labelledby="b" /> The name is supposed to be "bear".
(The name of "foo" that is)
What's expected in these cases? <span id="b"> <span> <input aria-labelledby="b" aria-label="33"> <span id="b"><span> <input aria-labelledby="b" aria-label="33"> <input aria-labelledby="oops" aria-label="33">
(In reply to comment #5) > What's expected in these cases? > > <span id="b"> <span> > <input aria-labelledby="b" aria-label="33"> > > <span id="b"><span> > <input aria-labelledby="b" aria-label="33"> > > <input aria-labelledby="oops" aria-label="33"> 33 for all.
Ok. I thought it might fall into empty name case like we have for atl="" or something. Any way, are these examples covered by mochitests?
Comment on attachment 460252 [details] [diff] [review] patch > <!-- aria-label plus aria-labelledby --> > <span id="btn_both_aria_labels" role="button" aria-label="I am a button, two" >- aria-labelledby="labelledby_text"/> >+ aria-labelledby="labelledby_text btn_both_aria_labels"/> this is tricky but looks good. > <!-- aria-label plus aria-labelledby --> > <button id="btn_both_aria_labels" aria-label="I am a button, two" >- aria-labelledby="labelledby_text"/> >+ aria-labelledby="labelledby_text btn_both_aria_labels"/> please line up while you're here >- <!-- button, aria-label, preferred to aria-labelledby --> >+ <!-- button, aria-label --> > <button id="btn_aria_label" >- aria-label="button label" >- aria-labelledby="btn_aria_labelledby_text">1</button> >+ aria-label="button label">1</button> I think logically would be right if you change this "aria-labelledby preferred to aria-label".
Attachment #460252 - Flags: review?(surkov.alexander) → review+
(In reply to comment #3) > Sure, I can fix the comments locally. There is no spec change yet, the action > to do that was passed only this morning. > > The request is to have aria-labelledby take precedence. Btw, what's the reason?
Thanks for reviewing while you are off :) I'll go over the tests before pushing (and change the comment). The main reason for the change is here: http://lists.w3.org/Archives/Public/public-pfwg-comments/2010AprJun/0000.html
Comment on attachment 460252 [details] [diff] [review] patch Seeking approval for a user-driven spec change that would be nice to get into 2.0. Not a blocker. Has tests.
Attachment #460252 - Flags: approval2.0?
Comment on attachment 460252 [details] [diff] [review] patch a=beltzner
Attachment #460252 - Flags: approval2.0? → approval2.0+
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: