RESOLVED FIXED 27964
WAI-ARIA: radio button does not determine its label from text content
https://bugs.webkit.org/show_bug.cgi?id=27964
Summary WAI-ARIA: radio button does not determine its label from text content
chris fleizach
Reported 2009-08-03 17:16:10 PDT
WAI-ARIA: radio button cannot determine its label from text content
Attachments
patch (7.59 KB, patch)
2009-08-04 09:38 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2009-08-04 09:23:22 PDT
*** Bug 27987 has been marked as a duplicate of this bug. ***
chris fleizach
Comment 2 2009-08-04 09:38:31 PDT
Darin Adler
Comment 3 2009-08-04 10:36:26 PDT
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.
Darin Adler
Comment 4 2009-08-04 10:45:28 PDT
(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.
chris fleizach
Comment 5 2009-08-04 10:47:51 PDT
i'll file a new bug to make the change for textUnderElement()
Darin Adler
Comment 6 2009-08-04 10:51:09 PDT
(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.
chris fleizach
Comment 7 2009-08-04 10:58:05 PDT
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
chris fleizach
Comment 8 2009-08-04 11:16:11 PDT
Note You need to log in before you can comment on or make changes to this bug.