Active Accessibility: Html <button> Element should not have any children.

VERIFIED FIXED in mozilla1.0

Status

defect
P1
normal
VERIFIED FIXED
18 years ago
17 days ago

People

(Reporter: dsirnapalli, Assigned: aaronlev)

Tracking

({access, topembed})

Trunk
mozilla1.0
x86
Windows NT
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: seeking r=, sr=)

Attachments

(1 attachment)

Reporter

Description

18 years ago
Below it the 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 getValue()
{
  try{
   return accNode.accValue;
  }
  catch(e){
    return(e);
  }
}

function executeTestCase()
{
 try{
  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

  var node = document.getElementsByTagName("button").item(0);
  node = node.firstChild;
  accNode = getAccessibleNode(node);
  var value = getValue();
  var newvalue = value.toString();
alert("Value: " + newvalue);

 }
 catch(e){
  alert("Exception: " + e);
 }
}

</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">Submit</button>');

setTimeout("executeTestCase();", 2000);

</script>
</body>
</html>
------------------------------------------------------------
When you execute the test case in Mozilla or MfcEmbed the alert shows 

Value: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAIL
URE) [nsIAccessible.accValue]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  locat
ion: "JS frame :: file:///C:/Netscape/Accessibility/bug.html :: getValue :: line
 36"  data: no]
Actually it should show NS_ERROR_NOT_IMPLEMENTED if the functionality is not 
implemented.
Assignee

Updated

18 years ago
Status: NEW → ASSIGNED
Keywords: access, fcc508, nsbeta1
Reporter

Comment 1

18 years ago
-- The same problem exists for HTML Table Cell Text Node also. accValue returns
NS_ERROR_FAILURE instead of NS_ERROR_NOT_IMPLEMENTED.
Assignee

Comment 2

18 years ago
That button shouldn't have any children!

That's what the bug should be.
Reporter

Comment 3

18 years ago
ya, after verifying with IE even i taught same thing. This button shouldn't have
any children.

So now there are actually two bugs in this case.
1. This button shouldn't have any children.
2. nsIAccessible's accValue returns NS_ERROR_FAILURE instead of
NS_ERROR_NOT_IMPLEMENTED for Html Table Cell Text Node and Html Caption Text Node.

Reporter

Comment 4

18 years ago
-- Renaming the summary.
Summary: Active Accessibility: nsIAccessible's accValue returns NS_ERROR_FAILURE instead of NS_ERROR_NOT_IMPLEMENTED for Html Button Text Node → Active Accessibility: Html Button Element should not have any children.
Assignee

Comment 5

18 years ago
This bug doesn't affect buttons like this: <input type="button" value="do it">
It only affects buttons like this: <button>hello</button>

This was originally a conscious choice between John Gaunt and myself, however,
firing up IE - it makes it clear we made the wrong choice. They always make the
button a leaf node, and just concatenate all of the text into the button name.
Summary: Active Accessibility: Html Button Element should not have any children. → Active Accessibility: Html <button> Element should not have any children.
Assignee

Updated

18 years ago
Keywords: topembed
Priority: -- → P1
Whiteboard: seeking r=, sr=
Target Milestone: --- → mozilla1.0
Comment on attachment 71440 [details] [diff] [review]
Makes <button> accessibles leaf accessibles - no children

r=jgaunt
Attachment #71440 - Flags: review+

Comment 8

18 years ago
Comment on attachment 71440 [details] [diff] [review]
Makes <button> accessibles leaf accessibles - no children

sr=hewitt
Attachment #71440 - Flags: superreview+
Assignee

Updated

18 years ago
Blocks: 75785
Comment on attachment 71440 [details] [diff] [review]
Makes <button> accessibles leaf accessibles - no children

a=shaver for 0.9.9.  (What the heck does the description of this patch mean?)
Attachment #71440 - Flags: approval+
Assignee

Comment 10

18 years ago
checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
Reporter

Comment 11

17 years ago
-- verified in today's trunk build. Works fine. marking the bug as verified.
Status: RESOLVED → VERIFIED
Reporter

Updated

17 years ago
QA Contact: doronr → dsirnapalli
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.