Opened 15 years ago

Closed 14 years ago

#3574 closed task (fixed)

make textarea widget accessible to screen readers

Reported by: Becky Gibson Owned by: Becky Gibson
Priority: high Milestone: 1.0
Component: Accessibility Version: 0.9
Keywords: Cc: Douglas Hays, Adam Peller
Blocked By: Blocking:

Description (last modified by Becky Gibson)

Not sure if this will be possible or not.

textarea widget is implemented using an iframe with designMode=on in Firefox and not sure this can be made accessible since can't seem to override the iframe role.

May require a significant rewrite of textarea or may not be possible to make accessible at all.

Change History (5)

comment:1 Changed 15 years ago by Becky Gibson

Description: modified (diff)

comment:2 Changed 15 years ago by Becky Gibson

(In [9526]) commit for peteb (IBM cla) updates to textarea for a11y - setting focus to correct item and adding wai role/state. refs #3574

comment:3 Changed 15 years ago by Becky Gibson

Cc: Douglas Hays Adam Peller added

Pete has found a way to make textarea reasonably accessible. But, it does require adding a title parameter to the iframe document used in Firefox. We need the title parameter because Firefox and the screen readers don't support iframes with designMode=on very well. By adding the title parameter, the screen reader will speak that title and the screen reader user will know that they are in an editable box. This has the drawback that it requires translation of the title string. This is NOT something we can ask the developer to provide - it is a static string of "edit box" (altho we might consider changing to "editable area"). I think this is worth the i18n hit in order to have an accessible textarea in dojo 1.0.

comment:4 Changed 15 years ago by Adam Peller

(In [9533]) Move iframe title string to nls. Refs #3574

comment:5 Changed 14 years ago by ptbrunet

Resolution: fixed
Status: newclosed

I think it's OK to close this one.

I'd like to add some background on the part of the solution of using the title attribute...

The document's title is used as the document's accessible name. Since FF fires focus from the document, and we can't put a waiRole on a document, the AT will not speak the role (because the role is PANE) but it will speak the accessible name (plus the text contents).

I gave the iframe's document a title (in the head section), the name of which is similar to a role name, i.e. "edit area". (Window-Eyes uses role names of "edit box", JAWS uses "edit".) The accessible name of "edit area" will give the user enough of a clue that they will not be lost. This also fixes a second problem. The accessible name was set by FF by default to a cryptic name, e.g. wyciwyg://13/ Hearing "edit area" is going to be a lot nicer than hearing that.

When tab is pressed and focus is fired on the iframe, I set the iframe's contentDocument's title to "edit area frame" before firing focus.

Note: There are some issues, probably timing issues, which cause the "edit area" not to be heard some times.

Note: See TracTickets for help on using tickets.