Closed Bug 298572 Opened 20 years ago Closed 19 years ago

Missing acc. name for XUL label and description tags

Categories

(Core :: Disability Access APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: parente, Assigned: parente)

References

Details

(Keywords: access)

Attachments

(1 file, 3 obsolete files)

XUL description and label tags do not report their values in the accessible name 
field. Current code is flattening subtree (which works for HTML) but needs to 
read value attr for XUL.

Attaching patch momentarily.
Bug 280065 dependent on this fix
Attachment #187122 - Flags: review?(aaronleventhal)
We better make sure this doesn't make Window-Eyes speak each label twice, since
a <label control="foo-id"> will already expose its text in the accName of the
control it points to.

Pete, contact me and I'll show you how to get a copy of Window-Eyes if you don't
already have one.
Comment on attachment 187122 [details] [diff] [review]
Reads value attr instead of flattening subtree

r=aaronlev assuming you test and make sure that labels don't get spoken twice
in xul dialogs as you tab through.
Attachment #187122 - Flags: review?(aaronleventhal) → review+
How do I make WindowEyes speak a XUL label? It's not focusable so tabbing to it 
won't work. What are the nav keys for exploring a window?

The patch needs to change anyways. XUL labels have their text in the value 
attribute, but XUL descriptions have text between start and end tags. The 
XULTextAccessible should either check the tag atom or, instead of type checking, 
check for a value attribute first, try to get text from there, and fallback on 
the inner text.
You can ask WindowEyes to read an entire window by pressing Ctrl-Shift-W. Doing 
this in the Preferences dialog where there are a number of labels works 
correctly. No labels are repeated.

(In reply to comment #3)
> (From update of attachment 187122 [details] [diff] [review] [edit])
> r=aaronlev assuming you test and make sure that labels don't get spoken twice
> in xul dialogs as you tab through.
> 

Comment on attachment 187122 [details] [diff] [review]
Reads value attr instead of flattening subtree

Actually a <description> can have rich subcontent rather than using the value
attribute. I'm not sure if <label> can do that.

So, you have to check to see if the value attribute was empty first. 

You can use the return values from content->GetAttr() to see if what it
returned was empty.

If still empty, then do the AppendFlatStringFromSubTree as we used to.

I think we don't need the QI to nsIDOMXULDescriptionElement any more, but you
would still need to see if mDOMNode is null.
Attachment #187122 - Flags: review+ → review-
Blocks: 280065
Attachment #187207 - Flags: review?(aaronleventhal)
Attachment #187122 - Attachment is obsolete: true
Comment on attachment 187207 [details] [diff] [review]
Returns value if exists else inner content

Fix the indent on the these lines:
+  if (!content) {
   return NS_ERROR_FAILURE;
 }
Attachment #187207 - Flags: review?(aaronleventhal) → review+
Attached patch Fixes indent nit (obsolete) — Splinter Review
Weird. Indent is correct in source but comes out wrong in the diff. No tabs
detected. Hmm.
Attachment #187207 - Attachment is obsolete: true
Attachment #187221 - Flags: review?(aaronleventhal)
Attachment #187221 - Flags: review?(aaronleventhal)
Attached patch Fixes indent nitSplinter Review
Found another indent problem.
Attachment #187221 - Attachment is obsolete: true
Attachment #187222 - Flags: review?(aaronleventhal)
Attachment #187222 - Flags: review?(aaronleventhal) → review+
Attachment #187222 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #187222 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Attachment #187222 - Flags: approval1.8b4?
Comment on attachment 187222 [details] [diff] [review]
Fixes indent nit

a=mkaply
Attachment #187222 - Flags: approval1.8b4? → approval1.8b4+
Attachment #187222 - Flags: approval1.8b4+ → approval1.8b3+
Thanks Peter.

Checking in nsXULTextAccessible.cpp;
/cvsroot/mozilla/accessible/src/xul/nsXULTextAccessible.cpp,v  <-- 
nsXULTextAccessible.cpp
new revision: 1.13; previous revision: 1.12
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
This wasn't supposed to get checked in while they prepare the beta.

Will check in tomorrow or asap.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Checking in accessible/src/xul/nsXULTextAccessible.cpp;
/cvsroot/mozilla/accessible/src/xul/nsXULTextAccessible.cpp,v  <-- 
nsXULTextAccessible.cpp
new revision: 1.15; previous revision: 1.14
done
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: