Closed Bug 622495 Opened 14 years ago Closed 14 years ago

New contentmodal alerts no longer accessible to screen readers

Categories

(Toolkit :: General, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla2.0b10
Tracking Status
blocking2.0 --- final+

People

(Reporter: MarcoZ, Assigned: Margaret)

References

Details

(Keywords: access, regression, Whiteboard: [hardblocker])

Attachments

(1 file)

When one of these new contentmodal alerts is generated, it is no longer properly exposed to assistive technologies.

The old alert was exposed as a "dialog" to screen readers, and the dialog text was added as a description to the dialog element/accessible, so screen readers would read it automatically before reading the "ok" or "cancel" buttons.

These buttons are still read, but that's about the only thing that is.

So to fix this, the new contentmodal dialog element needs:

a) the role "dialog" added to the element that contains the dialog title.
b) an aria-describedby that points to the child element ID that contains the question that's being asked.
blocking2.0: --- → ?
blocking2.0: ? → final+
Assignee: nobody → margaret.leibovic
Whiteboard: [hard blocker]
Attached patch patch (deleted) — Splinter Review
This looks like it should work. Marco, what do you think?
Attachment #502853 - Flags: feedback?(marco.zehe)
As an FYI, I just copied the aria-describedby that's used in commmonDialog.xul (http://mxr.mozilla.org/mozilla-central/source/toolkit/components/prompts/content/commonDialog.xul#11).
Status: NEW → ASSIGNED
Comment on attachment 502853 [details] [diff] [review]
patch

In theory, this should work, I am just not sure yet about whether the ID referencing works in XBL like it does in xUL. I'll get a build going and test the patch.
I think it should work in XBL. Gavin pointed me to this: http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsCoreUtils.cpp#899.
Whiteboard: [hard blocker] → [hardblocker]
Comment on attachment 502853 [details] [diff] [review]
patch

f=me. This works as expected.

One question: Do these dialogs also have a title? If so, at the same place where you put the aria-describedby, also put an aria-labelledby pointing to the ID that contains the title. Right now, the dialog that is announced is without title, and only the actual question gets spoken and brailled. If these dialogs don't have a title, then it's fine the way it is! Thanks!
Attachment #502853 - Flags: feedback?(marco.zehe) → feedback+
Comment on attachment 502853 [details] [diff] [review]
patch

The title element is info.title, but we never show that for tab-modal prompts (it's only left there hidden for compatiblity with the CommonDialog.jsm code used for non-tabmodal prompts, where the title is shown in the prompt/"sheet" itself on Mac), so no need to add that here, I think.
Attachment #502853 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/339ce7f5b7bb
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b10
Verified fixed in Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b10pre) Gecko/20110119 Firefox/4.0b10pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: