Summary: | WAI-ARIA: radio button does not determine its label from text content | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | chris fleizach <cfleizach> | ||||
Component: | Accessibility | Assignee: | chris fleizach <cfleizach> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
chris fleizach
2009-08-03 17:16:10 PDT
*** Bug 27987 has been marked as a duplicate of this bug. *** Created attachment 34070 [details]
patch
Comment on attachment 34070 [details] patch > - ariaLabel.append(' '); > + > + if (i != (size-1)) > + ariaLabel.append(' '); Conventional format would be: if (i != size - 1) without the extra parentheses and with spaces around the operator. Also, to avoid overflow, I think it should be: if (i + 1 < size) instead. Generally speaking it seems that the textUnderElement ought to contain the same kind of whitespace-collapsing logic that the normal rendering code does. This could be done by using the TextIterator instead of walking the nodes and concatenating them all. Not sure what bug it will cause that this just appends the DOM, but I suspect it will cause problems, especially when there are Also, I noticed that ariaAccessiblityName misspells the word accessibility. > +2009-08-04 Chris Fleizach <cfleizach@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + Added test for > + Bug 27964 - WAI-ARIA: radio button does not determine its label from text content > + https://bugs.webkit.org/show_bug.cgi?id=27964 > + > + Updated tests that expected the extra space at the end of some ARIA labels. > + > + * accessibility/aria-labelledby-stay-within.html: > + * platform/mac/accessibility/aria-describedby-on-input-expected.txt: > + * platform/mac/accessibility/aria-labelledby-on-input-expected.txt: > + * platform/mac/accessibility/aria-radiobutton-text-expected.txt: Added. > + * platform/mac/accessibility/aria-radiobutton-text.html: Added. > + > +2009-08-04 Chris Fleizach <cfleizach@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + Need a short description and bug URL (OOPS!) > + > + * accessibility/aria-labelledby-stay-within.html: > + * platform/mac/accessibility/aria-describedby-on-input-expected.txt: > + * platform/mac/accessibility/aria-labelledby-on-input-expected.txt: > + Double change log here. Otherwise looks fine. r=me as is, but consider the improvements I suggested. (In reply to comment #3) > (From update of attachment 34070 [details]) > Also, to avoid overflow, I think it should be: > > if (i + 1 < size) > > instead. Actually, there's no overflow issue, since you wouldn't be in the loop at all if size was 0, so please ignore that erroneous comment. i'll file a new bug to make the change for textUnderElement() (In reply to comment #3) > Not sure what bug it will cause that this just appends > the DOM, but I suspect it will cause problems, especially when there are I meant to say "especially when there are" elements with "display: none" or "visibility: hidden" involved. filed https://bugs.webkit.org/show_bug.cgi?id=27989 so we can revisit that topic. i am also unsure what would happen if nodes were rendered hidden |