Bug 277750 Menu exposes 2-level accessible
r=aaronleventhal sr=neil.parkwaycc.co.uk git-svn-id: svn://10.0.0.236/trunk@186895 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
if (this.localName == "menuseparator")
|
||||
return accService.createXULMenuSeparatorAccessible(this);
|
||||
if (this.parentNode && this.parentNode.parentNode &&
|
||||
this.parentNode.localName == "menupopup" && this.parentNode.parentNode.localName == "menulist")
|
||||
return accService.createXULSelectOptionAccessible(this);
|
||||
return accService.createXULMenuitemAccessible(this);
|
||||
]]>
|
||||
</getter>
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
<getter>
|
||||
<![CDATA[
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
// Won't create accessible for (menu)popup if parent node is menu
|
||||
// to avoid redundant accessible for menu
|
||||
if (this.localName == "popup" || this.localName == "menupopup")
|
||||
return (this.parentNode.localName == "menulist")? accService.createXULSelectListAccessible(this): accService.createXULMenupopupAccessible(this);
|
||||
return (this.parentNode.localName != "menu") ?
|
||||
accService.createXULMenupopupAccessible(this): null;
|
||||
else if (this.localName == "tooltip")
|
||||
return accService.createXULTooltipAccessible(this);
|
||||
return null;
|
||||
|
||||
@@ -23,19 +23,10 @@
|
||||
<getter>
|
||||
<![CDATA[
|
||||
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||
if (this.localName == "popup")
|
||||
return (this.parentNode.localName == "menulist")? accService.createXULSelectListAccessible(this): accService.createXULMenupopupAccessible(this);
|
||||
//
|
||||
// Create accessible for menupopup when parent node is:
|
||||
// 1. menulist: for combobox to visit its menu items
|
||||
// 2. toolbarbutton: for which has menupopup child
|
||||
// Otherwise, won't create accessible for menupopup, e.g.
|
||||
// 1. menu: to avoid redundant accessible for menu
|
||||
// 2. other situations ...
|
||||
//
|
||||
if (this.localName == "menupopup")
|
||||
return ((this.parentNode.localName == "menulist") ||
|
||||
(this.parentNode.localName == "toolbarbutton")) ?
|
||||
// Won't create accessible for (menu)popup if parent node is menu
|
||||
// to avoid redundant accessible for menu
|
||||
if (this.localName == "popup" || this.localName == "menupopup")
|
||||
return (this.parentNode.localName != "menu") ?
|
||||
accService.createXULMenupopupAccessible(this): null;
|
||||
else if (this.localName == "tooltip")
|
||||
return accService.createXULTooltipAccessible(this);
|
||||
|
||||
Reference in New Issue
Block a user