зеркало из https://github.com/mozilla/gecko-dev.git
Bug 423700 - aria-activedescendant broken on <body>, patch=aaronlev, r=ginn.chen, a=beltzner
This commit is contained in:
Родитель
d18ecb0e8a
Коммит
83cc25473b
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче