XP part of accessibility landing
-r vidur, rods -sr hyatt
This commit is contained in:
@@ -32,6 +32,11 @@
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIPresState.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsIMutableAccessible.h"
|
||||
#include "nsIAccessibilityService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIDOMNode.h"
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
nsresult
|
||||
@@ -82,6 +87,23 @@ nsGfxCheckboxControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr
|
||||
*aInstancePtr = (void*) ((nsICheckboxControlFrame*) this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessible))) {
|
||||
nsresult rv = NS_OK;
|
||||
NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv);
|
||||
if (accService) {
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(mContent);
|
||||
nsIMutableAccessible* acc = nsnull;
|
||||
accService->CreateMutableAccessible(node,&acc);
|
||||
acc->SetName(NS_LITERAL_STRING("Check Box").get());
|
||||
acc->SetRole(NS_LITERAL_STRING("check box").get());
|
||||
acc->SetIsLeaf(PR_TRUE);
|
||||
*aInstancePtr = acc;
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return nsFormControlFrame::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user