diff --git a/accessible/src/base/nsARIAMap.cpp b/accessible/src/base/nsARIAMap.cpp index 4f6a6aff730..b580e3b68ec 100644 --- a/accessible/src/base/nsARIAMap.cpp +++ b/accessible/src/base/nsARIAMap.cpp @@ -177,6 +177,7 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] = // Manually map EXT_STATE_SUPPORTS_AUTOCOMPLETION aria-autocomplete {&nsAccessibilityAtoms::aria_autocomplete, "list", nsIAccessibleStates::STATE_HASPOPUP}, {&nsAccessibilityAtoms::aria_autocomplete, "both", nsIAccessibleStates::STATE_HASPOPUP}, + {&nsAccessibilityAtoms::aria_secret, kBoolState, nsIAccessibleStates::STATE_PROTECTED}, {&nsAccessibilityAtoms::aria_disabled, kBoolState, nsIAccessibleStates::STATE_UNAVAILABLE}, {&nsAccessibilityAtoms::aria_readonly, kBoolState, nsIAccessibleStates::STATE_READONLY}, kEndEntry}, {"toolbar", nsIAccessibleRole::ROLE_TOOLBAR, eNameLabelOrTitle, eNoValue, kNoReqStates, diff --git a/accessible/src/base/nsAccessibilityAtomList.h b/accessible/src/base/nsAccessibilityAtomList.h index b942a0cf8b5..25a94e5458e 100755 --- a/accessible/src/base/nsAccessibilityAtomList.h +++ b/accessible/src/base/nsAccessibilityAtomList.h @@ -211,6 +211,7 @@ ACCESSIBILITY_ATOM(aria_pressed, "aria-pressed") ACCESSIBILITY_ATOM(aria_readonly, "aria-readonly") ACCESSIBILITY_ATOM(aria_relevant, "aria-relevant") ACCESSIBILITY_ATOM(aria_required, "aria-required") +ACCESSIBILITY_ATOM(aria_secret, "aria-secret") ACCESSIBILITY_ATOM(aria_selected, "aria-selected") ACCESSIBILITY_ATOM(aria_setsize, "aria-setsize") ACCESSIBILITY_ATOM(aria_sort, "aria-sort") diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index 9d88b7acf8d..d2e0cbd79b5 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -1948,7 +1948,15 @@ NS_IMETHODIMP nsAccessible::GetFinalRole(PRUint32 *aRole) // These unfortunate exceptions don't fit into the ARIA table // This is where the nsIAccessible role depends on both the role and ARIA state - if (*aRole == nsIAccessibleRole::ROLE_PUSHBUTTON) { + if (*aRole == nsIAccessibleRole::ROLE_ENTRY) { + nsCOMPtr content = do_QueryInterface(mDOMNode); + if (content && content->AttrValueIs(kNameSpaceID_None, nsAccessibilityAtoms::aria_secret, + nsAccessibilityAtoms::_true, eCaseMatters)) { + // For entry field with aria-secret="true" + *aRole = nsIAccessibleRole::ROLE_PASSWORD_TEXT; + } + } + else if (*aRole == nsIAccessibleRole::ROLE_PUSHBUTTON) { nsCOMPtr content = do_QueryInterface(mDOMNode); if (content) { if (content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_pressed)) { diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/html/nsHyperTextAccessible.cpp index 6f50b86e905..90f36ce68ce 100644 --- a/accessible/src/html/nsHyperTextAccessible.cpp +++ b/accessible/src/html/nsHyperTextAccessible.cpp @@ -344,6 +344,7 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset, PRInt32 startOffset = aStartOffset; PRInt32 endOffset = aEndOffset; // XXX this prevents text interface usage on + // but work is needed on aria-secret (which may be removed) PRBool isPassword = (Role(this) == nsIAccessibleRole::ROLE_PASSWORD_TEXT); // Clear out parameters and set up loop