mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
Bug 96065. Active Accessibility text nodes should not be focusable. r=jgaunt, sr=brendan\
This commit is contained in:
parent
4e3dd44ec7
commit
ac2ec34b5d
@ -612,11 +612,15 @@ NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
|
||||
nsresult rv = NS_OK;
|
||||
*aAccState = 0;
|
||||
|
||||
if (NS_SUCCEEDED(rv) && mFocusController) {
|
||||
nsCOMPtr<nsIDOMElement> focusedElement, currElement(do_QueryInterface(mDOMNode));
|
||||
mFocusController->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (focusedElement == currElement)
|
||||
*aAccState |= STATE_FOCUSED;
|
||||
nsCOMPtr<nsIDOMElement> currElement(do_QueryInterface(mDOMNode));
|
||||
if (currElement) {
|
||||
*aAccState |= STATE_FOCUSABLE;
|
||||
if (mFocusController) {
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
rv = mFocusController->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (NS_SUCCEEDED(rv) && focusedElement == currElement)
|
||||
*aAccState |= STATE_FOCUSED;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -1469,7 +1473,7 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
|
||||
nsAccessible::GetAccState(_retval);
|
||||
*_retval |= STATE_READONLY | STATE_SELECTABLE;
|
||||
if (IsALink()) {
|
||||
*_retval |= STATE_FOCUSABLE | STATE_LINKED;
|
||||
*_retval |= STATE_LINKED;
|
||||
if (mIsLinkVisited)
|
||||
*_retval |= STATE_TRAVERSED;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAWritableString& _retval)
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsHTMLTextAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_STATICTEXT;
|
||||
*_retval = ROLE_TEXT;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -612,11 +612,15 @@ NS_IMETHODIMP nsAccessible::GetAccState(PRUint32 *aAccState)
|
||||
nsresult rv = NS_OK;
|
||||
*aAccState = 0;
|
||||
|
||||
if (NS_SUCCEEDED(rv) && mFocusController) {
|
||||
nsCOMPtr<nsIDOMElement> focusedElement, currElement(do_QueryInterface(mDOMNode));
|
||||
mFocusController->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (focusedElement == currElement)
|
||||
*aAccState |= STATE_FOCUSED;
|
||||
nsCOMPtr<nsIDOMElement> currElement(do_QueryInterface(mDOMNode));
|
||||
if (currElement) {
|
||||
*aAccState |= STATE_FOCUSABLE;
|
||||
if (mFocusController) {
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
rv = mFocusController->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (NS_SUCCEEDED(rv) && focusedElement == currElement)
|
||||
*aAccState |= STATE_FOCUSED;
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -1469,7 +1473,7 @@ NS_IMETHODIMP nsLinkableAccessible::GetAccState(PRUint32 *_retval)
|
||||
nsAccessible::GetAccState(_retval);
|
||||
*_retval |= STATE_READONLY | STATE_SELECTABLE;
|
||||
if (IsALink()) {
|
||||
*_retval |= STATE_FOCUSABLE | STATE_LINKED;
|
||||
*_retval |= STATE_LINKED;
|
||||
if (mIsLinkVisited)
|
||||
*_retval |= STATE_TRAVERSED;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetAccName(nsAWritableString& _retval)
|
||||
/* unsigned long getAccRole (); */
|
||||
NS_IMETHODIMP nsHTMLTextAccessible::GetAccRole(PRUint32 *_retval)
|
||||
{
|
||||
*_retval = ROLE_STATICTEXT;
|
||||
*_retval = ROLE_TEXT;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user