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...
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;
> 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. :)
Created attachment 598872 [details] [diff] [review]
*** Bug 671201 has been marked as a duplicate of this bug. ***
Comment on attachment 598872 [details] [diff] [review]