Closed Bug 661293 Opened 13 years ago Closed 13 years ago

test for tabmodalprompt dialog's prompt label getting the text properly associated for accessibility

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: MarcoZ, Assigned: surkov)

References

Details

(Keywords: access)

Attachments

(1 file)

By accessibility technology vendor report, i noticed that the label that is supposed to provide the description for the tabModalPrompt dialog accessible provides an empty description. The reason is that the label pointed to (anon ID is info.body) does not have an accessible name. Instead, it has a text leaf below it that has the actual text. The hierarchy, starting from the dialog looks like this: - dialog accessible with an empty accessible name and an empty accessible description - - label with an empty accessible name - - - text leaf accessible that contains the actual alert text - - button that has an accessible name of "OK", corresponding to the visible label. Question: Why is the text not associated with the xul:description element with anonid of info.body directly? How is that child element being created, and is there a way to explicitly link its contents via aria-labelledby to the xul:description info.body element so we get the description to the dialog accessible?
(In reply to comment #0) > Question: Why is the text not associated with the xul:description element > with anonid of info.body directly? There are two ways to use a xul:description... <description value="foo"/> <description>bar</description> The main reason for using the latter is that when "bar" is a long string, it will line-wrap. When the text is specified as the |value| attribute, it won't wrap (ie, all on one line). We very much want this text to wrap when it's long, since it's supplied by the web page. I'm happy to tweak things here , but I'd suggest since this is a widespread pattern you might want a more general solution. I'm not sure if that needs handled on on XUL side or A11Y. > How is that child element being created See CommonDialog.jsm's onLoad()... // display the main text // Bug 317334 - crop string length as a workaround. let croppedMessage = this.args.text.substr(0, 10000); let infoBody = this.ui.infoBody; infoBody.appendChild(infoBody.ownerDocument.createTextNode(croppedMessage)); > and is there a way to explicitly link its contents via aria-labelledby to > the xul:description info.body element so we get the description to the > dialog accessible? You tell me. :) Also, is this a regression from Firefox 3.6? This code is shared between the tab-modal and window-modal prompts, and for this stuff I think is functionally unchanged from previous versions.
(In reply to Justin Dolske [:Dolske] from comment #1) > (In reply to comment #0) > > and is there a way to explicitly link its contents via aria-labelledby to > > the xul:description info.body element so we get the description to the > > dialog accessible? > > You tell me. :) bug 421242
Depends on: 421242
Blocks: 671201
Attached patch mochitestSplinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #598872 - Flags: review?(marco.zehe)
Comment on attachment 598872 [details] [diff] [review] mochitest r=me
Attachment #598872 - Flags: review?(marco.zehe) → review+
Target Milestone: --- → mozilla14
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: XUL Widgets → Disability Access APIs
Flags: in-testsuite+
Product: Toolkit → Core
QA Contact: xul.widgets → accessibility-apis
Depends on: 736905
Summary: the tabmodalprompt dialog's prompt label doesn't get the text properly associated for accessibility → test for tabmodalprompt dialog's prompt label getting the text properly associated for accessibility
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: