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

RESOLVED FIXED in mozilla14

Status

()

Core
Disability Access APIs
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: MarcoZ, Assigned: surkov)

Tracking

({access})

Trunk
mozilla14
access
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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.
(Assignee)

Comment 2

6 years ago
(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
(Assignee)

Updated

6 years ago
Blocks: 671201
(Assignee)

Comment 3

6 years ago
Created attachment 598872 [details] [diff] [review]
mochitest
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #598872 - Flags: review?(marco.zehe)
(Assignee)

Updated

6 years ago
Duplicate of this bug: 671201
(Reporter)

Comment 5

6 years ago
Comment on attachment 598872 [details] [diff] [review]
mochitest

r=me
Attachment #598872 - Flags: review?(marco.zehe) → review+
(Assignee)

Comment 6

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/faa1752c22fd

Updated

6 years ago
Target Milestone: --- → mozilla14

Comment 7

6 years ago
https://hg.mozilla.org/mozilla-central/rev/faa1752c22fd
Status: ASSIGNED → RESOLVED
Last Resolved: 6 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.