Closed Bug 111284 Opened 23 years ago Closed 23 years ago

Active Accessibility: accName returns null for HTML DOM table node instead of returning name

Categories

(SeaMonkey :: General, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: dsirnapalli, Assigned: aaronlev)

Details

(Keywords: access)

Attachments

(1 file)

Below is the shortened version of 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 getDomNodeTable()
{
 try{
  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

  var node = document.getElementsByTagName("table").item(0);
  return node;
 }
 catch(e){
  alert("Exception: " + e);
 }
}

</script>
</head>
<body>

<center>
<table border cols=2 width="50%">
<caption>Test Table</caption>
 <tr>
  <td> Row1,Col1</td>
  <td> Row1,Col2</td>
 </tr>
 <tr>
  <td> Row2,Col1</td>
  <td> Row2,Col2</td>
 </tr>
 <tr>
  <td> Row3,Col1</td>
  <td> Row3,Col2</td>
 </tr>
</table>
</center>

<script type="text/javascript">
try{
  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

  var domNode = getDomNodeTable();
  alert("domNode: " + domNode);
  var accNode = getAccessibleNode(domNode);
  alert("accNode: " + accNode);

  var name = accNode.accName;
  alert("Name: " + name);
}
catch(e){
  alert("Exception: " + e);
}
</script>
</body>
</html>
----------------------
I am displaying the HTML table first, and using dom api i am getting the dom 
node for table. after getting the dom node for table i am checking for wheather 
that dom node is accessible or not.in this case the dom node is accessible.
1.When i run this test case from mozilla  accNode.accName returns null.
2.When i run this test case from mozilla and open mozInspect and check the 
table node mozInspect shows null.that is fine but
3.When i run this test case from IE and open mozInspect and check the table node 
mozInspect returns "Test Table". It picks up the caption text for accName.
I know the test case doesnot run properly from IE but i wanted to display table 
so that i can use to test using mozInspect.
is accName a standard DOM property?  Or is this something IE-specific?
accName is a property of nsIAccessible interface.Its present in 
nsIAccessible.idl.It returns the name of the accessible node.
Summary: accName returns null for HTML DOM table node instead of returning name → Active Accessibility: accName returns null for HTML DOM table node instead of returning name
Status: NEW → ASSIGNED
Keywords: access, fcc508
Priority: -- → P1
Target Milestone: --- → mozilla0.9.7
Attached patch Tested -- worksSplinter Review
Whiteboard: seeking r=, sr=
-> fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: seeking r=, sr=
--Verfied.Works fine in both mozilla and MFCEmbed.
Status: RESOLVED → VERIFIED
QA Contact: doronr → dsirnapalli
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: