Recently went through an accessibility review, this was the comments on filefield.
When tabbing through this form, one of the controls is labeled
"browse". Nowever, it is not clear that this means "browse for icon file".
The screen reader user only hears the label of the field that gains focus
when tabbing, so she will not be aware of surrounding text when in this
mode.The best way of fixing this is to use a html fieldset. Surround all of the
icon related fields with a fieldset, and set the legend to "icon". Now,
when the screen reader user tabs to one of the upload fields, she will
hear the content of the legend element, followed by the label of the
field which gains focus ("browse", or "upload").
Mostly a FYI
Comment | File | Size | Author |
---|---|---|---|
#3 | filefield_upload_accessiblity.patch | 628 bytes | quicksketch |
Comments
Comment #1
quicksketchHmm, might want to talk to your accessibility review people. The "Browse..." text is provided by the Web Browser and is not controllable by FileField (or any other HTML) unless you do a series of fancy JavaScript modifications (which tends to result in more problems). See http://www.quirksmode.org/dom/inputfile.html
Comment #2
quicksketchOh, I misunderstood (and didn't read the second paragraph). This is certainly a valid request. Things get a little difficult because CCK is in control of multi-value fields, but FileField may be able to handle this itself for single file uploads. We actually used to use a fieldset in Drupal 5, but we removed that to closer emulate the visual appearance of other elements in the form. I'll see what kind of options we have for fixing this.
Comment #3
quicksketchHere's as much as we can do in the FileField queue. It's a simple fix, simply make our label tag point to the upload field so that it makes some sense. I've filed a matching issue over in the CCK queue to correct the same problem with multi-value fields: #780434: Improve accessibility of multi-value fields.
Comment #4
quicksketchI also committed a matching patch for ImageField.