diff --git a/accessible/src/base/nsARIAMap.cpp b/accessible/src/base/nsARIAMap.cpp index 064517fd5a4..62b086a0867 100644 --- a/accessible/src/base/nsARIAMap.cpp +++ b/accessible/src/base/nsARIAMap.cpp @@ -625,34 +625,34 @@ nsStateMapEntry nsARIAMap::gWAIUnivStateMap[] = { * @note ARIA attributes that don't have any flags are not included here */ nsAttributeCharacteristics nsARIAMap::gWAIUnivAttrMap[] = { - {&nsAccessibilityAtoms::aria_activedescendant, ATTR_EXPOSEOBJ }, + {&nsAccessibilityAtoms::aria_activedescendant, ATTR_BYPASSOBJ }, {&nsAccessibilityAtoms::aria_atomic, ATTR_VALTOKEN }, {&nsAccessibilityAtoms::aria_busy, ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_checked, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_controls, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_describedby, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_disabled, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_checked, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, /* exposes checkable obj attr */ + {&nsAccessibilityAtoms::aria_controls, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_describedby, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_disabled, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, {&nsAccessibilityAtoms::aria_dropeffect, ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_expanded, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_flowto, ATTR_EXPOSEOBJ }, + {&nsAccessibilityAtoms::aria_expanded, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_flowto, ATTR_BYPASSOBJ }, {&nsAccessibilityAtoms::aria_grabbed, ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_haspopup, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_invalid, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_labelledby, ATTR_EXPOSEOBJ }, + {&nsAccessibilityAtoms::aria_haspopup, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_invalid, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_labelledby, ATTR_BYPASSOBJ }, {&nsAccessibilityAtoms::aria_live, ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_multiline, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_multiselectable, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_owns, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_pressed, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_readonly, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_relevant, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_required, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_selected, ATTR_EXPOSEOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_multiline, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_multiselectable, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_owns, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_pressed, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_readonly, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_relevant, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_required, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, + {&nsAccessibilityAtoms::aria_selected, ATTR_BYPASSOBJ | ATTR_VALTOKEN }, {&nsAccessibilityAtoms::aria_sort, ATTR_VALTOKEN }, - {&nsAccessibilityAtoms::aria_valuenow, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_valuemin, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_valuemax, ATTR_EXPOSEOBJ }, - {&nsAccessibilityAtoms::aria_valuetext, ATTR_EXPOSEOBJ } + {&nsAccessibilityAtoms::aria_valuenow, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_valuemin, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_valuemax, ATTR_BYPASSOBJ }, + {&nsAccessibilityAtoms::aria_valuetext, ATTR_BYPASSOBJ } }; PRUint32 nsARIAMap::gWAIUnivAttrMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIUnivAttrMap); diff --git a/accessible/src/base/nsARIAMap.h b/accessible/src/base/nsARIAMap.h index 18eed91f62b..99eb4311f02 100644 --- a/accessible/src/base/nsARIAMap.h +++ b/accessible/src/base/nsARIAMap.h @@ -73,11 +73,12 @@ enum ELiveAttrRule // ARIA attribute characteristic masks, grow as needed /** - * This mask indicates the attribute should be exposed as an object attribute, - * used to expose semantics not traditionally found in a11y APIs. - * (See for example usage in nsAccessible::GetAttributes) + * This mask indicates the attribute should not be exposed as an object + * attribute via the catch-all logic in nsAccessible::GetAttributes. + * This means it either isn't mean't to be exposed as an object attribute, or + * that it should, but is already handled in other code. */ -const PRUint8 ATTR_EXPOSEOBJ = 0x0001; +const PRUint8 ATTR_BYPASSOBJ = 0x0001; /** * This mask indicates the attribute is expected to have an NMTOKEN or bool value. diff --git a/accessible/src/base/nsAccessible.cpp b/accessible/src/base/nsAccessible.cpp index b61d8209d2a..cba149d21e7 100644 --- a/accessible/src/base/nsAccessible.cpp +++ b/accessible/src/base/nsAccessible.cpp @@ -1723,8 +1723,8 @@ nsAccessible::GetAttributes(nsIPersistentProperties **aAttributes) if (PL_strncmp(attrStr, "aria-", 5)) continue; // Not ARIA PRUint8 attrFlags = nsAccUtils::GetAttributeCharacteristics(attrAtom); - if (attrFlags & ATTR_EXPOSEOBJ) - continue; // No need to expose obj attribute -- will be exposed some other way + if (attrFlags & ATTR_BYPASSOBJ) + continue; // No need to handle exposing as obj attribute here if ((attrFlags & ATTR_VALTOKEN) && !nsAccUtils::HasDefinedARIAToken(content, attrAtom)) continue; // only expose token based attributes if they are defined