зеркало из https://github.com/mozilla/pjs.git
Bug 149858 [XBLFC] Active Accessibility: support XBL-based HTML radio
r=aaronl, sr=jst Add nsIAccessibleProvider in radio.xml, create accessible object for XBL radio button
This commit is contained in:
Родитель
1016cf5c89
Коммит
02f117ccc1
|
@ -50,6 +50,7 @@ interface nsIAccessibilityService : nsISupports
|
||||||
nsIAccessible createHTMLNativeWindowAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell, in PRInt32 aHWnd);
|
nsIAccessible createHTMLNativeWindowAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell, in PRInt32 aHWnd);
|
||||||
nsIAccessible createHTMLPluginAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell);
|
nsIAccessible createHTMLPluginAccessible(in nsIDOMNode aDOMNode, in nsIWeakReference aShell);
|
||||||
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
|
nsIAccessible createHTMLRadioButtonAccessible(in nsISupports aFrame);
|
||||||
|
nsIAccessible createHTMLRadioButtonAccessibleXBL(in nsIDOMNode aNode);
|
||||||
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
|
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsISupports aPresShell);
|
||||||
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
|
nsIAccessible createHTMLTableAccessible(in nsISupports aFrame);
|
||||||
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
|
nsIAccessible createHTMLTableCellAccessible(in nsISupports aFrame);
|
||||||
|
|
|
@ -605,6 +605,25 @@ nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsISupports *aFrame, nsI
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsAccessibilityService::CreateHTMLRadioButtonAccessibleXBL(nsIDOMNode *aNode, nsIAccessible **_retval)
|
||||||
|
{
|
||||||
|
#ifdef MOZ_XUL
|
||||||
|
nsCOMPtr<nsIWeakReference> weakShell;
|
||||||
|
GetShellFromNode(aNode, getter_AddRefs(weakShell));
|
||||||
|
|
||||||
|
// reusing the HTML accessible widget and enhancing for XUL
|
||||||
|
*_retval = new nsHTMLRadioButtonAccessible(aNode, weakShell);
|
||||||
|
if (! *_retval)
|
||||||
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
NS_ADDREF(*_retval);
|
||||||
|
#else
|
||||||
|
*_retval = nsnull;
|
||||||
|
#endif // MOZ_XUL
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
|
nsAccessibilityService::CreateHTMLSelectOptionAccessible(nsIDOMNode* aDOMNode, nsIAccessible *aAccParent, nsISupports* aPresContext, nsIAccessible **_retval)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,6 +46,18 @@
|
||||||
<xul:image class="input-radio-check"/>
|
<xul:image class="input-radio-check"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
</content>
|
</content>
|
||||||
|
<implementation implements="nsIAccessibleProvider">
|
||||||
|
<property name="accessible">
|
||||||
|
<getter>
|
||||||
|
<![CDATA[
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Temporary, until bug 104907 is fixed
|
||||||
|
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||||
|
return accService.createHTMLRadioButtonAccessibleXBL(this);
|
||||||
|
]]>
|
||||||
|
</getter>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</implementation>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
|
@ -46,6 +46,18 @@
|
||||||
<xul:image class="input-radio-check"/>
|
<xul:image class="input-radio-check"/>
|
||||||
</xul:hbox>
|
</xul:hbox>
|
||||||
</content>
|
</content>
|
||||||
|
<implementation implements="nsIAccessibleProvider">
|
||||||
|
<property name="accessible">
|
||||||
|
<getter>
|
||||||
|
<![CDATA[
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); // Temporary, until bug 104907 is fixed
|
||||||
|
var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
|
||||||
|
return accService.createHTMLRadioButtonAccessibleXBL(this);
|
||||||
|
]]>
|
||||||
|
</getter>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</implementation>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
||||||
</bindings>
|
</bindings>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче