Closed
Bug 124234
Opened 23 years ago
Closed 22 years ago
Active Accessibility: nsHTMLButtonAccessible::accDoAction does not work
Categories
(SeaMonkey :: General, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: dsirnapalli, Assigned: aaronlev)
References
Details
(Keywords: access, topembed+)
Attachments
(1 file, 1 obsolete file)
4.22 KB,
patch
|
john
:
review+
jst
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Below is the simple test case. ------------------------------------ <html> <head> <script type="text/javascript"> function getAccessibleNode(startNode) { var accessibleService = null; var accessibleNode = null; try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); accessibleService = Components.classes ["@mozilla.org/accessibilityService;1"].createInstance(); accessibleService = accessibleService.QueryInterface (Components.interfaces.nsIAccessibilityService); } catch(e){ alert("Error getting accessibility service"); } try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); accessibleNode = accessibleService.getAccessibleFor(startNode); return accessibleNode; } catch(e){ return "Exception"; } } function executeTestCase() { try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var node = document.getElementsByTagName("button").item(0); accNode = getAccessibleNode(node); alert("accNumActions: " + accNode.accNumActions); alert("getAccActionName: " + accNode.getAccActionName(0)); action = doAction(); alert("accDoAction:" + action); } catch(e){ alert("Exception: " + e); } } function doAction() { try{ accNode.accDoAction(0); } catch(e){ return e; } } function clicked() { alert("Submit button pressed"); } </script> </head> <body> <script type="text/javascript"> <!-- Test Button --> document.write('<br>'); document.write('<b>Testing Button for Accessibility..</b><br><br>'); document.write('<button value="submit" onClick="clicked();"> Submit </button>'); setTimeout("executeTestCase();", 2000); </script> </body> </html> ------------------------------------------ -- When you run the above test case. the first alert you get will show how many numactions are there. here it is 1. next alert will show the actionname for numaction zero. The next alert will show the exception returned when accDoAction is called. if the function was successful alert "Submit button pressed" would have been displayed. The error displayed is. accDoAction:[Exception... "Component returned failure code: 0x80004005 (NS_ERROR _FAILURE) [nsIAccessible.accDoAction]" nsresult: "0x80004005 (NS_ERROR_FAILURE) " location: "JS frame :: file:///C:/Netscape/Accessibility/testcase.html :: doA ction :: line 56" data: no]
Assignee | ||
Updated•23 years ago
|
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 2•23 years ago
|
||
changing summary so it fits better in the list ( we should come up with somehting shorter than Active Accessibility for the lead on the summary )
Summary: Active Accessibility: nsIAccessible's accDoAction does not work for Html Button Node → Active Accessibility: nsHTMLButtonAccessible::accDoAction does not work
Updated•22 years ago
|
Assignee | ||
Updated•22 years ago
|
Severity: major → blocker
Reporter | ||
Updated•22 years ago
|
QA Contact: doronr → dsirnapalli
Assignee | ||
Comment 4•22 years ago
|
||
Fix in hand. We were trying to QI an HTML 4 <button> to nsIDOMHTMLInputElement, and we got null. The fix adds a Click() method to nsIDOMNSHTMLButtonElement(), and uses that interface instead.
Assignee | ||
Comment 5•22 years ago
|
||
ready to attach patch
Assignee: jgaunt → aaronl
Status: ASSIGNED → NEW
Assignee | ||
Comment 6•22 years ago
|
||
Comment 7•22 years ago
|
||
Comment on attachment 77510 [details] [diff] [review] Uses nsIDOMNSHTMLButtonElement::Click() now You'll need to add re-entrancy protection to nsHTMLButtonElement::Click(), see nsHTMLInputElement::Click().
Attachment #77510 -
Flags: needs-work+
Assignee | ||
Comment 8•22 years ago
|
||
Attachment #77510 -
Attachment is obsolete: true
Comment 9•22 years ago
|
||
Comment on attachment 77531 [details] [diff] [review] Protects against reentrency using PRBool mHandlingClick - In nsHTMLButtonElement::Click(): + GetDocument(*getter_AddRefs(doc)); + + if (doc) { ... + } + return NS_ERROR_FAILURE; Make this return NS_OK, calling click() on a button that's not in the tree should not throw an exception. sr=jst with that change.
Attachment #77531 -
Flags: superreview+
Assignee | ||
Comment 10•22 years ago
|
||
Change made to return NS_OK. Won't attach new patch unless requested.
Comment 11•22 years ago
|
||
Comment on attachment 77531 [details] [diff] [review] Protects against reentrency using PRBool mHandlingClick r=jkeiser, but could you indulge my thread paranoia and put the mHandlingClick = PR_TRUE; mHandlingClick = PR_FALSE; pair at the beginning and end of the function?
Attachment #77531 -
Flags: review+
Comment 12•22 years ago
|
||
What bug does the user see? There's a dependency on XBL form controls but we won't be turning them on for Mach V, so is this bug fix still needed?
Comment 13•22 years ago
|
||
Comment on attachment 77531 [details] [diff] [review] Protects against reentrency using PRBool mHandlingClick a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77531 -
Flags: approval+
Assignee | ||
Comment 14•22 years ago
|
||
The dependancy was bogus. This fix is necessary so that screen readers can work with our software.
No longer depends on: 57209
Comment 15•22 years ago
|
||
adt1.0.0+ (on ADT's behalf) approval for checkin into 1.0.
Assignee | ||
Comment 16•22 years ago
|
||
fixed in trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 17•22 years ago
|
||
-- Verified in current mozilla nightly build. The fix works fine. Marking the bug as verified.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 18•5 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•