Closed
Bug 420863
Opened 17 years ago
Closed 17 years ago
If an HTML element has an onClick attribute, expose its click action on the element rather than its child text leaf node.
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9
People
(Reporter: MarcoZ, Assigned: surkov)
References
Details
(Keywords: access)
Attachments
(2 files, 1 obsolete file)
356 bytes,
text/html
|
Details | |
8.27 KB,
patch
|
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
This morning, Jamie of NV Access and I discussed OnClick attributes on HTML elements. In his example, an onclick handler was present on an html:td element. He then discovered the following (copied from IRC log): <Jamie> MarcoZ: hmm... ok... here's the scoop on that clickable thing <Jamie> MarcoZ: The "click" action is exposed on the text node, but for links, it's on the link. this means we have to drill down to the text node in order ot trigger the action <Jamie> for a clickable table cell <Jamie> This makes for inconsistency in terms of code, but also, we're no longer using the IAccessible text child nodes when we move around the document
Flags: blocking1.9?
Reporter | ||
Comment 1•17 years ago
|
||
This testcase shows an onclick handler on the first table cell, and nothing on the second. If you look at the hierarchy using accProbe, you'll see that the text leaf child of the table cell with the onclick handler has an action of "click", but the table cell itself does not. So every screen reader is required to drill down to the text leaf accessible to seee that the td has an onclick handler.
Assignee | ||
Comment 2•17 years ago
|
||
may be fixed in bug 421066
Assignee | ||
Comment 3•17 years ago
|
||
expose actions if element has registered click event handler by default
Assignee: aaronleventhal → surkov.alexander
Status: NEW → ASSIGNED
Attachment #308824 -
Flags: review?(aaronleventhal)
Assignee | ||
Comment 4•17 years ago
|
||
Marco, could you morph your testcase to mochitest?
Flags: in-testsuite?
Comment 5•17 years ago
|
||
Comment on attachment 308824 [details] [diff] [review] patch r+ but you only need to calculate isOnclick if aIndex == 0
Attachment #308824 -
Flags: review?(aaronleventhal) → review+
Assignee | ||
Comment 6•17 years ago
|
||
Comment on attachment 308824 [details] [diff] [review] patch I will fix this before checking in
Attachment #308824 -
Flags: approval1.9?
Comment 7•17 years ago
|
||
Can we get that mochitest? Waiting on approval until we can get a test if at all possible.
Assignee | ||
Comment 8•17 years ago
|
||
with Aaron's comments and mochitest
Attachment #308824 -
Attachment is obsolete: true
Attachment #309325 -
Flags: approval1.9?
Attachment #308824 -
Flags: approval1.9?
Reporter | ||
Comment 9•17 years ago
|
||
Thanks for adding theMochitest, Alexander! Here at CSUN, tthings are pretty busy, so I appreciate the help!
Reporter | ||
Comment 10•17 years ago
|
||
A question: In the code block
> + PRBool isOnclick = nsAccUtils::HasListener(content,
> + NS_LITERAL_STRING("click"));
Would it be too difficult to add a check for MouseDown as well? Gmail uses that instead of "click", and it would allow NVDA to recognize those as clickables as well. Or should this go into a separate bug?
Assignee | ||
Comment 11•17 years ago
|
||
(In reply to comment #10) > A question: In the code block > > > + PRBool isOnclick = nsAccUtils::HasListener(content, > > + NS_LITERAL_STRING("click")); > > Would it be too difficult to add a check for MouseDown as well? Gmail uses that > instead of "click", and it would allow NVDA to recognize those as clickables as > well. Or should this go into a separate bug? > It's not hard but it seems to me it's not correct. Let see button for example, in XUL they register handlers on command event, command event is fired after mousedown/mouseup. It means action is executed after mousedown and if followin up mouseup event is handled.
Reporter | ||
Comment 12•17 years ago
|
||
(In reply to comment #11) > (In reply to comment #10) > It's not hard but it seems to me it's not correct. Let see button for example, > in XUL they register handlers on command event, command event is fired after > mousedown/mouseup. It means action is executed after mousedown and if followin > up mouseup event is handled. I realize this is not how XUL does it, but it is what would allow screen readers to better access gmail and other similar web apps. But I now think this should go into a separate bug.
Assignee | ||
Comment 13•17 years ago
|
||
But it's common thing: action is performed when widget is clicked, right?
Comment 14•17 years ago
|
||
Comment on attachment 309325 [details] [diff] [review] patch2 Nice! Really appreciate the test. :) a1.9+=damons
Attachment #309325 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 15•17 years ago
|
||
/cvsroot/mozilla/accessible/src/base/nsAccessible.cpp,v <-- nsAccessible.cpp new revision: 1.363; previous revision: 1.362 done Checking in accessible/tests/mochitest/Makefile.in; /cvsroot/mozilla/accessible/tests/mochitest/Makefile.in,v <-- Makefile.in new revision: 1.8; previous revision: 1.7 done RCS file: /cvsroot/mozilla/accessible/tests/mochitest/test_bug420863.html,v done Checking in accessible/tests/mochitest/test_bug420863.html; /cvsroot/mozilla/accessible/tests/mochitest/test_bug420863.html,v <-- test_bug420863.html initial revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•17 years ago
|
||
Marco please open new bug to track mousedown issue
Assignee | ||
Comment 17•16 years ago
|
||
patch contains mochitests, in-testsuite+
Flags: in-testsuite? → in-testsuite+
Reporter | ||
Updated•6 years ago
|
Flags: blocking1.9?
You need to log in
before you can comment on or make changes to this bug.
Description
•