Opened 13 years ago
Closed 13 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: | [email protected]… | |
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)
Change History (10)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Milestone: | 1.0.1 → 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.
comment:3 Changed 13 years ago by
Milestone: | 1.1 → 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.
comment:4 Changed 13 years ago by
Status: | new → assigned |
---|
Changed 13 years ago by
Attachment: | 5117.patch added |
---|
comment:5 Changed 13 years ago by
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 13 years ago by
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 13 years ago by
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 13 years ago by
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Results with Inspect and various screen readers:
Inspect
Window-Eyes
JAWS 9
JAWS 10