Closed Bug 542646 Opened 16 years ago Closed 16 years ago

Don't walk the anonymous content free for text controls on HTML web pages

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (v1) (obsolete) — Splinter Review
We discussed this with David today, and we believe that it's not needed for the a11y code to walk the anonymous content tree of text controls (<input type=text|password> and <textarea>). The attached patch does this. I've run the entire a11y test suite with this patch, and it seems that it's not breaking anything at least! :-)
Attachment #423864 - Flags: review?(bolterbugz)
Attached patch Patch (v1)Splinter Review
Actually, the inclusion of nsPresContext.h is not needed.
Attachment #423864 - Attachment is obsolete: true
Attachment #423865 - Flags: review?
Attachment #423864 - Flags: review?(bolterbugz)
Attachment #423865 - Flags: review? → review?(bolterbugz)
Comment on attachment 423865 [details] [diff] [review] Patch (v1) Hey thanks for taking a look at this. Did you confirm that we do walk the anonymous text controls? In any event I'm not sure we need this patch.
(I mean anonymous text control frames)
(In reply to comment #0) > Created an attachment (id=423864) [details] > Patch (v1) > > We discussed this with David today, and we believe that it's not needed for the > a11y code to walk the anonymous content tree of text controls (<input > type=text|password> and <textarea>). > The attached patch does this. I've run the entire a11y test suite with this > patch, and it seems that it's not breaking anything at least! :-) Then we don't have proper a11y tests. I believe nsHyperTextAccessible logic depends there are accessibles inside of text controls. I wonder what is the initial reason of this bug? I think the bug is wontfix because we don't expose these accessible to AT but they are used internally. We could fix that of course but I'm not sure it's worth since it should require huge amount of time and I don't see any worth motivation.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
(In reply to comment #4) > (In reply to comment #0) > > Created an attachment (id=423864) [details] [details] > > Patch (v1) > > > > We discussed this with David today, and we believe that it's not needed for the > > a11y code to walk the anonymous content tree of text controls (<input > > type=text|password> and <textarea>). > > > The attached patch does this. I've run the entire a11y test suite with this > > patch, and it seems that it's not breaking anything at least! :-) > > Then we don't have proper a11y tests. Looking more deeply your changes don't have any affect because this code isn't used for text fields (see http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHyperTextAccessible.cpp#222). I wonder if getting an accessibles from is editor's document is equivalent to getting an accessbiles from native anonymous content in this case.
Blocks: treea11y
OS: Mac OS X → All
Hardware: x86 → All
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #0) > > > Created an attachment (id=423864) [details] [details] [details] > > > Patch (v1) > > > > > > We discussed this with David today, and we believe that it's not needed for the > > > a11y code to walk the anonymous content tree of text controls (<input > > > type=text|password> and <textarea>). > > > > > The attached patch does this. I've run the entire a11y test suite with this > > > patch, and it seems that it's not breaking anything at least! :-) > > > > Then we don't have proper a11y tests. > > Looking more deeply your changes don't have any affect because this code isn't > used for text fields (see > http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHyperTextAccessible.cpp#222). You are right. Ehsan is getting to know layout pretty well, and has concerns about us walking the frame children of text fields. I'm not sure there is a problem though, since we won't hold on to these frames long. > I wonder if getting an accessibles from is editor's document is equivalent > to getting an accessbiles from native anonymous content in this case. Not sure of your question, but if we can use API to avoid walking the frames ourselves that is preferred.
(In reply to comment #6) > > I wonder if getting an accessibles from is editor's document is equivalent > > to getting an accessbiles from native anonymous content in this case. > > Not sure of your question, but if we can use API to avoid walking the frames > ourselves that is preferred. The question is can we walk native anonymous content instead of waking editor document? Walking frames by ourselves will be fixed in bug 534527.
(In reply to comment #7) > (In reply to comment #6) > > > > I wonder if getting an accessibles from is editor's document is equivalent > > > to getting an accessbiles from native anonymous content in this case. > > > > Not sure of your question, but if we can use API to avoid walking the frames > > ourselves that is preferred. > > The question is can we walk native anonymous content instead of waking editor > document? Walking frames by ourselves will be fixed in bug 534527. So, there are three types of editors, <input type=text|password>, <textarea> and contenteditable elements. For the first two, the editor's root node is an anonymous div created under the content node. The latter is however a bit more complex. For contenteditable elements, the editor uses a body element which is _not_ in the anonymous content tree, so I guess the above solution wouldn't work in every case. How about special casing the input and textarea elements there? Would that be a good approach?
(In reply to comment #8) > How about special casing the input and textarea elements there? Would that be > a good approach? I think yes. We could remove that hack from nsHyperTextAccessible for these elements and be happy with common approach that works currently for input@type="file" for example. For contenteditable elements we create accessibles for explicit children I think.
Filed bug 542824 for special casing that code.
Attachment #423865 - Flags: review?(bolterbugz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: