Opened 12 years ago

Closed 11 years ago

#5117 closed defect (fixed)

Textarea, FF2/3 only: accessible name is not set when labelfor is used.

Reported by: ptbrunet Owned by: Becky Gibson
Priority: high Milestone: 1.0.2
Component: Accessibility Version: 0.9
Keywords: Cc: brunet@…
Blocked By: Blocking:

Description

Using a local copy of .../dijit/tests/form/test_Textarea.html modify the test to make the text "Inline:" a label for the text area next to it. (See the combo box test for an example of using labelfor.)

FF2/3: The accessible name is missing when labelfor is coded. It is always set to "edit area".

IE6/7: OK when labelfor is coded.

Attachments (1)

5117.patch (1.3 KB) - added by Becky Gibson 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by ptbrunet

Results with Inspect and various screen readers:

Inspect

  • FF2 - focus is on pane with acc name of "edit area", grandchild is text object with contents
  • FF3 - can't test due to 5116
  • IE6/7 - focus is on grouping object; it has acc name of the label, child is text object with contents

Window-Eyes

  • FF2 - label is not read; hear: "edit area" followed by text field contents
  • FF3 - can't test due to 5116
  • IE6 - hear: the label, the role (grouping object); don't hear text field contents
  • IE7 - hear: the label, text field contents, the role (grouping object)

JAWS 9

  • FF2 - hear: edit area, no label, no contents
  • FF3 - can't test due to 5116
  • IE6/7 - just hear the label

JAWS 10

  • FF2 - hear nothing
  • FF3 - can't test due to 5116
  • IE6/7 - just hear the label

comment:2 Changed 12 years ago by Becky Gibson

Milestone: 1.0.11.1

Since Firefox currently uses an iframe for the editable area and we can not assign ARIA properties to an iframe we can not fix this and I am moving to 1.1. Firefox 3 is supposed to support contentEditable for editable areas. Then it should work like IE and we can address if necessary.

comment:3 Changed 11 years ago by Becky Gibson

Milestone: 1.11.0.2

have a fix which adds the text from the label into the title of the iframe document - will post for review by Bill and others. Problem is that it needs to search for associated label element to extract the text so I need to make sure I coded the query properly.

comment:4 Changed 11 years ago by Becky Gibson

Status: newassigned

Changed 11 years ago by Becky Gibson

Attachment: 5117.patch added

comment:5 Changed 11 years ago by Becky Gibson

When in Firefox and the textarea is implemented as an iframe, the patch above searches for a label element associated with this widget and assigns the text of the label element to the title element of the iframe document. This improves the accessibility and allows the label text to be spoken when the resizeable textarea gets focus.

I'd like someone to double check my use of dojo.query before commmitting this fix. The only potential issue I see is if the label text is very long - but that is unlikely.

comment:6 Changed 11 years ago by bill

To answer your question directly, I think you can do dojo.query("label[htmlFor='+this.id+"']") and it's theoretically faster, at least for FF and Safari.

To speak more generally, not sure if this is worth patching since the problem will go away with FF3 anyway when we support contentEditable (won't it?), or presumably would also go away if we did #4979, which is starting to seem more attractive.

comment:7 Changed 11 years ago by Becky Gibson

But, even though this control passes a11y testing using IE, any product using it would have to file a deviation since it is not accessible on both browsers. This patch would alleviate the deviation for those using 1.0.2 without having to wait for 1.1.

comment:8 Changed 11 years ago by Becky Gibson

(In [11772]) refs #5117. Add the text form any label element associated with the textarea to the title of the document in the FF iframe for a11y.

comment:9 Changed 11 years ago by Becky Gibson

Resolution: fixed
Status: assignedclosed

(In [11773]) fixes #5117. Add the text form any label element associated with the textarea to the title of the document in the FF iframe for a11y.

Note: See TracTickets for help on using tickets.