Closed Bug 207487 Opened 21 years ago Closed 21 years ago

No accessible name for XUL <textbox>

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

(Keywords: access)

Attachments

(1 file, 2 obsolete files)

When a XUL textbox is in the accessible tree, it has an empty name, even when
there is a <label> associated with it.

For example, see the textbox with the label "Subject or Sender Contains" in mail
(the quick search field).
The problem was that nsFormControlAccessible::GetAccName thought this was an
html node, and didn't see that it was a XUL node or it's context within the
document.
Attachment #124444 - Flags: review?(kyle.yuan)
Comment on attachment 124444 [details] [diff] [review]
Create accessible from XBL where XUL node is, not from anonymous html:input child

Yes, I also met this issue and tried to hack on GetAccName. But your fix is
neater. One thing I concerned is that we always assume mDOMNode in
nsHTMLTextFieldAccessible is either a nsIDOMHTMLTextAreaElement or a
nsIDOMHTMLInputElement.  Will this new XUL element affect that?
Comment on attachment 124444 [details] [diff] [review]
Create accessible from XBL where XUL node is, not from anonymous html:input child

Good catch, I'll have to put up a new patch with that in mind.
Attachment #124444 - Attachment is obsolete: true
Attachment #124444 - Flags: review?(kyle.yuan)
The fields for an nsIDOMXULTextboxElement already existed, but there was just
no idl file yet. Looks like an oversight to me.
Attachment #124631 - Flags: review?(kyle.yuan)
Attachment #124683 - Flags: review?(kyle.yuan)
Attachment #124631 - Flags: review?(kyle.yuan)
Comment on attachment 124683 [details] [diff] [review]
Same as last patch, but I don't need to QI nsIDOMHTMLInputElement to nsIDOMNode, before passing it as an argument when creating the temp accessible --  I can use automatic conversion

r=kyle
I'm okay with the accessibility changes, but I'm not sure about the xul/idl
changes. Please also ask some xul guru to r/sr= this. 

two nits/questions:
1) please encapsulate the code referring to nsIDOMXULTextboxElement into a
#ifdef MOZ_XUL block.
2) 
-      <property name="maxlength"  onset="this.inputField.maxlength = val;
return val;"
+      <property name="maxLength"  onset="this.inputField.maxlength = val;
return val;"
what's the need to change this?
Attachment #124683 - Flags: review?(kyle.yuan) → review+
Kyle,

Thanks for reminding me about MOZ_XUL.

I was changing the name maxLength to be consistent with the capitalization in
textLength. Our javascript property naming convention is interCaps with a
lowercase first letter.
Attachment #124683 - Flags: superreview?(alecf)
I questioned that because maxlength also appears in the xbl:inherits attribute, 
see:
http://lxr.mozilla.org/seamonkey/source/xpfe/global/resources/content/bindings/t
extbox.xml#22
So I'm not sure whether this will break the xbl:inherits if xbl is using a case 
sensitive string comparison.
No, it doesn't break that because inherits="" deals with XML attributes, not
javascript properties. It's normal for the attribute to keep the all lowercase
name, while the javascript property gets interCaps.
Comment on attachment 124683 [details] [diff] [review]
Same as last patch, but I don't need to QI nsIDOMHTMLInputElement to nsIDOMNode, before passing it as an argument when creating the temp accessible --  I can use automatic conversion

-      <property name="maxlength"  onset="this.inputField.maxlength = val;
return val;"
+      <property name="maxLength"  onset="this.inputField.maxlength = val;
return val;"

woah, you SURE nobody else is using this?

sr=alecf assuming you've made sure.
Attachment #124683 - Flags: superreview?(alecf) → superreview+
I've made sure, because maxlength is not used as a javascript property within
textbox.xml, and there was no interface that used maxlength in lowercase that
this implements, so nothing outside could use it.
Comment on attachment 124683 [details] [diff] [review]
Same as last patch, but I don't need to QI nsIDOMHTMLInputElement to nsIDOMNode, before passing it as an argument when creating the temp accessible --  I can use automatic conversion

Seeking a= for accessibility patch that has baked on the trunk for 2 weeks.
Attachment #124683 - Flags: approval1.4?
Comment on attachment 124683 [details] [diff] [review]
Same as last patch, but I don't need to QI nsIDOMHTMLInputElement to nsIDOMNode, before passing it as an argument when creating the temp accessible --  I can use automatic conversion

moving approval request forward.
Attachment #124683 - Flags: approval1.4? → approval1.4.x?
Comment on attachment 124683 [details] [diff] [review]
Same as last patch, but I don't need to QI nsIDOMHTMLInputElement to nsIDOMNode, before passing it as an argument when creating the temp accessible --  I can use automatic conversion

This is not going to make 1.4.1.  Please renominate after 1.4.1 ships if you'd
like to get this in for 1.4.2.
Attachment #124683 - Flags: approval1.4.x? → approval1.4.x-
fixed on June 4, 2003 according to bonsai 
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: