Bug 423700 â aria-activedescendant broken on <body>, patch=aaronlev, r=ginn.chen, a=beltzner
git-svn-id: svn://10.0.0.236/trunk@248238 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
eccaf4ccfb
commit
e555da45a6
@ -1142,7 +1142,7 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
|
||||
// The activedescendant universal property redirects accessible focus events
|
||||
// to the element with the id that activedescendant points to
|
||||
nsCOMPtr<nsIDOMNode> currentFocus = GetCurrentFocus();
|
||||
if (currentFocus == targetNode) {
|
||||
if (SameCOMIdentity(GetRoleContent(currentFocus), targetNode)) {
|
||||
nsRefPtr<nsRootAccessible> rootAcc = GetRootAccessible();
|
||||
if (rootAcc)
|
||||
rootAcc->FireAccessibleFocusEvent(nsnull, currentFocus, nsnull, PR_TRUE);
|
||||
|
||||
@ -463,7 +463,9 @@ PRBool nsRootAccessible::FireAccessibleFocusEvent(nsIAccessible *aAccessible,
|
||||
domDoc->GetElementById(id, getter_AddRefs(relatedEl));
|
||||
finalFocusNode = do_QueryInterface(relatedEl);
|
||||
if (!finalFocusNode) {
|
||||
return PR_FALSE;
|
||||
// If aria-activedescendant is set to nonextistant ID, then treat as focus
|
||||
// on the activedescendant container (which has real DOM focus)
|
||||
finalFocusNode = aNode;
|
||||
}
|
||||
finalFocusAccessible = nsnull;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user