Ticket #5117 (closed defect: fixed)

Opened 6 months ago

Last modified 5 months ago

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

Reported by: ptbrunet Owned by: becky
Priority: normal Milestone: 1.0.2
Component: Accessibility Version: 0.9
Severity: normal Keywords:
Cc: brunet@…

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

5117.patch (1.3 kB) - added by becky 5 months ago.

Change History

Changed 6 months 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

Changed 6 months ago by becky

  • milestone changed from 1.0.1 to 1.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.

Changed 5 months ago by becky

  • milestone changed from 1.1 to 1.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.

Changed 5 months ago by becky

  • status changed from new to assigned

Changed 5 months ago by becky

Changed 5 months ago by becky

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.

Changed 5 months 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.

Changed 5 months ago by becky

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.

Changed 5 months ago by becky

(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.

Changed 5 months ago by becky

  • status changed from assigned to closed
  • resolution set to fixed

(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.