Closed Bug 428954 Opened 16 years ago Closed 16 years ago

Wrong accessible name for iframe-based ARIA widgets

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

When a Javascript custom widget is made from an iframe, it must be possible to define the accessible name (label) on the iframe itself, where the widget is instantiated.

For example, the following widget should have "List of colors:" as the label.
http://www.mozilla.org/access/dhtml/listbox-owner
Attachment #315549 - Attachment is patch: true
Attachment #315549 - Attachment mime type: application/octet-stream → text/plain
Aaron, could you provide an example?
Should we try to get ARIA name firstly instead to drop the name getting from title and url?
Alexander, I'm not sure I understand your question.

The way this works is that the iframe's accessible label/name is used if it's a good one. Otherwise the body/docaccessible gets a chance.
I understand the question now.

Basically I think, no -- this patch is the right way to do this. The inner widget may wish to define a default accessible name via ARIA and I don't want the title or url of the inner document to block that.
Ok, let me look in details:

nsOuterAcc::GetName

1) title from inner (nsDocAcc)
2) ARIA name
3) url from inner (nsDocAcc)

nsDocAcc::GetName

1) name from outer (nsOuterAcc)
2) ARIA name
3) title from self

nsOuterAcc:
You suggest to save 2) item of nsOuterAcc and to loose 1) and 3) and I still don't catch you why we don't need this any more (how can title or url block ARIA name of the inner?).

nsDocAcc:
Why nsDocAcc prefers to get name from outer rather than own ARIA name?

Do we want to try url if title (see 3d item) is empty?
> Why nsDocAcc prefers to get name from outer rather than own ARIA name?
Here's what happens. A developer creates a mashup widget in an iframe. Other developers use the iframe. The iframe widget author doesn't know what context it will be used for each time, but the outer document author does know. So the iframe element really represents the specific instance data. The specific instance is more specific and should be able to set the specific a11y properties of that usage.
See http://developer.mozilla.org/en/docs/ARIA_User_Agent_Implementors_Guide#11.3.16_Documents.2C_Handling_.3Cframe.3Es_and_.3Ciframe.3Es

These iframe-based widgets are becoming more common.

I don't want to use the full URL to repair a missing accessible name. It doesn't make much sense to hear that a listbox is called http://www.blahblah.org/widgets/listbox.htm -- we already know it's a listbox from the role or it's not accessible at all.

Does that make sense?



Ok, since now inner gets name from outer and outer check url then should we add url checking to inner?
Maybe. However, the inner exposes the URL via the accessible value and the document interface so it would in fact be redundant.

Marco, if a doc has no title or other name, does the URL need to be exposed in accName?
(In reply to comment #9)
> Marco, if a doc has no title or other name, does the URL need to be exposed in
> accName?

Well it should be present as a last resort if everything else fails, yes. Otherwise one would get empty-named frames, which is just as irritating.
Attachment #315549 - Attachment is obsolete: true
Attachment #315762 - Flags: review?(surkov.alexander)
Attachment #315549 - Flags: review?(surkov.alexander)
Attachment #315762 - Flags: review?(surkov.alexander)
Attachment #315762 - Flags: review+
Attachment #315762 - Flags: approval1.9?
Comment on attachment 315762 [details] [diff] [review]
Allow URL as last resort

a1.9=beltzner
Attachment #315762 - Flags: approval1.9? → approval1.9+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041606 Minefield/3.0pre.
Status: RESOLVED → VERIFIED
Depends on: 429796
Depends on: 441519
Flagging for intestsuite since I'll be adding a test for an absent name in bug 441519.
Flags: in-testsuite?
Test in fix for bug 441519, test_nsOuterDocAccessible.html.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: