summaryrefslogtreecommitdiffstats
path: root/accessible/base
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /accessible/base
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/base')
-rw-r--r--accessible/base/ARIAMap.cpp23
-rw-r--r--accessible/base/ARIAMap.h13
-rw-r--r--accessible/base/AccGroupInfo.cpp1
-rw-r--r--accessible/base/AccIterator.cpp60
-rw-r--r--accessible/base/AccIterator.h8
-rw-r--r--accessible/base/Asserts.cpp2
-rw-r--r--accessible/base/HTMLMarkupMap.h7
-rw-r--r--accessible/base/Platform.h4
-rw-r--r--accessible/base/RoleMap.h151
-rw-r--r--accessible/base/moz.build4
-rw-r--r--accessible/base/nsAccessibilityService.cpp24
-rw-r--r--accessible/base/nsAccessibilityService.h13
-rw-r--r--accessible/base/nsCoreUtils.cpp58
-rw-r--r--accessible/base/nsCoreUtils.h16
-rw-r--r--accessible/base/nsTextEquivUtils.cpp31
15 files changed, 384 insertions, 31 deletions
diff --git a/accessible/base/ARIAMap.cpp b/accessible/base/ARIAMap.cpp
index 01cc5d0417..bfc41db82e 100644
--- a/accessible/base/ARIAMap.cpp
+++ b/accessible/base/ARIAMap.cpp
@@ -733,7 +733,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] = {
},
{ // grid
nsGkAtoms::grid,
- roles::TABLE,
+ roles::GRID,
kUseMapRole,
eNoValue,
eNoAction,
@@ -1480,7 +1480,8 @@ const nsRoleMapEntry* aria::GetRoleMap(dom::Element* aEl) {
return GetRoleMapFromIndex(GetRoleMapIndex(aEl));
}
-uint8_t aria::GetRoleMapIndex(dom::Element* aEl) {
+uint8_t aria::GetFirstValidRoleMapIndexExcluding(
+ dom::Element* aEl, std::initializer_list<nsStaticAtom*> aRolesToSkip) {
nsAutoString roles;
if (!aEl || !nsAccUtils::GetARIAAttr(aEl, nsGkAtoms::role, roles) ||
roles.IsEmpty()) {
@@ -1492,6 +1493,19 @@ uint8_t aria::GetRoleMapIndex(dom::Element* aEl) {
while (tokenizer.hasMoreTokens()) {
// Do a binary search through table for the next role in role list
const nsDependentSubstring role = tokenizer.nextToken();
+
+ // Skip any roles that we aren't interested in.
+ bool shouldSkip = false;
+ for (nsStaticAtom* atomRole : aRolesToSkip) {
+ if (role.Equals(atomRole->GetUTF16String())) {
+ shouldSkip = true;
+ break;
+ }
+ }
+ if (shouldSkip) {
+ continue;
+ }
+
size_t idx;
auto comparator = [&role](const nsRoleMapEntry& aEntry) {
return Compare(role, aEntry.ARIARoleString(),
@@ -1508,6 +1522,11 @@ uint8_t aria::GetRoleMapIndex(dom::Element* aEl) {
return LANDMARK_ROLE_MAP_ENTRY_INDEX;
}
+uint8_t aria::GetRoleMapIndex(dom::Element* aEl) {
+ // Get the rolemap index of the first valid role, excluding nothing.
+ return GetFirstValidRoleMapIndexExcluding(aEl, {});
+}
+
const nsRoleMapEntry* aria::GetRoleMapFromIndex(uint8_t aRoleMapIndex) {
switch (aRoleMapIndex) {
case NO_ROLE_MAP_ENTRY_INDEX:
diff --git a/accessible/base/ARIAMap.h b/accessible/base/ARIAMap.h
index 30cc1f0814..58a96b7112 100644
--- a/accessible/base/ARIAMap.h
+++ b/accessible/base/ARIAMap.h
@@ -234,6 +234,19 @@ const uint8_t LANDMARK_ROLE_MAP_ENTRY_INDEX = UINT8_MAX;
*/
const nsRoleMapEntry* GetRoleMap(dom::Element* aEl);
+/*
+ * Get the role map entry pointer's index for a given DOM node, skipping any
+ * given roles. This will use the first valid ARIA role if the role attribute
+ * provides a space delimited list of roles, excluding any given roles.
+ *
+ * @param aEl [in] the DOM node to get the role map entry for
+ * @param aRolesToSkip [in] the roles to skip when searching the role string
+ * @return the index of the pointer to the role map entry for the
+ * ARIA role, or NO_ROLE_MAP_ENTRY_INDEX if none
+ */
+uint8_t GetFirstValidRoleMapIndexExcluding(
+ dom::Element* aEl, std::initializer_list<nsStaticAtom*> aRolesToSkip);
+
/**
* Get the role map entry pointer's index for a given DOM node. This will use
* the first ARIA role if the role attribute provides a space delimited list of
diff --git a/accessible/base/AccGroupInfo.cpp b/accessible/base/AccGroupInfo.cpp
index 3b536b1aa4..c3501dc36e 100644
--- a/accessible/base/AccGroupInfo.cpp
+++ b/accessible/base/AccGroupInfo.cpp
@@ -263,6 +263,7 @@ uint32_t AccGroupInfo::TotalItemCount(Accessible* aContainer,
bool* aIsHierarchical) {
uint32_t itemCount = 0;
switch (aContainer->Role()) {
+ case roles::GRID:
case roles::TABLE:
if (auto val = aContainer->GetIntARIAAttr(nsGkAtoms::aria_rowcount)) {
if (*val >= 0) {
diff --git a/accessible/base/AccIterator.cpp b/accessible/base/AccIterator.cpp
index badd34c0d5..d28d5fcbe9 100644
--- a/accessible/base/AccIterator.cpp
+++ b/accessible/base/AccIterator.cpp
@@ -71,7 +71,12 @@ AccIterator::IteratorState::IteratorState(const LocalAccessible* aParent,
RelatedAccIterator::RelatedAccIterator(DocAccessible* aDocument,
nsIContent* aDependentContent,
nsAtom* aRelAttr)
- : mDocument(aDocument), mRelAttr(aRelAttr), mProviders(nullptr), mIndex(0) {
+ : mDocument(aDocument),
+ mDependentContent(aDependentContent),
+ mRelAttr(aRelAttr),
+ mProviders(nullptr),
+ mIndex(0),
+ mIsWalkingDependentElements(false) {
nsAutoString id;
if (aDependentContent->IsElement() &&
aDependentContent->AsElement()->GetAttr(nsGkAtoms::id, id)) {
@@ -80,26 +85,57 @@ RelatedAccIterator::RelatedAccIterator(DocAccessible* aDocument,
}
LocalAccessible* RelatedAccIterator::Next() {
- if (!mProviders) return nullptr;
+ if (!mProviders || mIndex == mProviders->Length()) {
+ if (mIsWalkingDependentElements) {
+ // We've walked both dependent ids and dependent elements, so there are
+ // no more targets.
+ return nullptr;
+ }
+ // We've returned all dependent ids, but there might be dependent elements
+ // too. Walk those next.
+ mIsWalkingDependentElements = true;
+ mIndex = 0;
+ if (auto providers =
+ mDocument->mDependentElementsMap.Lookup(mDependentContent)) {
+ mProviders = &providers.Data();
+ } else {
+ mProviders = nullptr;
+ return nullptr;
+ }
+ }
while (mIndex < mProviders->Length()) {
const auto& provider = (*mProviders)[mIndex++];
// Return related accessible for the given attribute.
- if (provider->mRelAttr == mRelAttr) {
- LocalAccessible* related = mDocument->GetAccessible(provider->mContent);
- if (related) {
- return related;
- }
+ if (mRelAttr && provider->mRelAttr != mRelAttr) {
+ continue;
+ }
+ // If we're walking elements (not ids), the explicitly set attr-element
+ // `mDependentContent` must be a descendant of any of the refering element
+ // `mProvider->mContent`'s shadow-including ancestors.
+ if (mIsWalkingDependentElements &&
+ !nsCoreUtils::IsDescendantOfAnyShadowIncludingAncestor(
+ mDependentContent, provider->mContent)) {
+ continue;
+ }
+ LocalAccessible* related = mDocument->GetAccessible(provider->mContent);
+ if (related) {
+ return related;
+ }
- // If the document content is pointed by relation then return the
- // document itself.
- if (provider->mContent == mDocument->GetContent()) {
- return mDocument;
- }
+ // If the document content is pointed by relation then return the
+ // document itself.
+ if (provider->mContent == mDocument->GetContent()) {
+ return mDocument;
}
}
+ // We exhausted mProviders without returning anything.
+ if (!mIsWalkingDependentElements) {
+ // Call this function again to start walking the dependent elements.
+ return Next();
+ }
return nullptr;
}
diff --git a/accessible/base/AccIterator.h b/accessible/base/AccIterator.h
index 463e3e9d3e..61b126c812 100644
--- a/accessible/base/AccIterator.h
+++ b/accessible/base/AccIterator.h
@@ -67,7 +67,9 @@ class AccIterator : public AccIterable {
/**
* Allows to traverse through related accessibles that are pointing to the given
- * dependent accessible by relation attribute.
+ * dependent accessible by relation attribute. This is typically used to query
+ * implicit reverse relations; e.g. calculating the LABEL_FOR relation for a
+ * label where that label was referenced using aria-labelledby.
*/
class RelatedAccIterator : public AccIterable {
public:
@@ -79,7 +81,7 @@ class RelatedAccIterator : public AccIterable {
* @param aDependentContent [in] the content of dependent accessible that
* relations were requested for
* @param aRelAttr [in] relation attribute that relations are
- * pointed by
+ * pointed by, null for all relations
*/
RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
nsAtom* aRelAttr);
@@ -97,9 +99,11 @@ class RelatedAccIterator : public AccIterable {
RelatedAccIterator& operator=(const RelatedAccIterator&);
DocAccessible* mDocument;
+ nsIContent* mDependentContent;
nsAtom* mRelAttr;
DocAccessible::AttrRelProviders* mProviders;
uint32_t mIndex;
+ bool mIsWalkingDependentElements;
};
/**
diff --git a/accessible/base/Asserts.cpp b/accessible/base/Asserts.cpp
index efdd733d9b..729b4e1ea5 100644
--- a/accessible/base/Asserts.cpp
+++ b/accessible/base/Asserts.cpp
@@ -12,7 +12,7 @@
using namespace mozilla::a11y;
#define ROLE(geckoRole, stringRole, ariaRole, atkRole, macRole, macSubrole, \
- msaaRole, ia2Role, androidClass, nameRule) \
+ msaaRole, ia2Role, androidClass, iosIsElement, nameRule) \
static_assert( \
static_cast<uint32_t>(roles::geckoRole) == \
static_cast<uint32_t>(nsIAccessibleRole::ROLE_##geckoRole), \
diff --git a/accessible/base/HTMLMarkupMap.h b/accessible/base/HTMLMarkupMap.h
index b903097ea0..c607616518 100644
--- a/accessible/base/HTMLMarkupMap.h
+++ b/accessible/base/HTMLMarkupMap.h
@@ -34,7 +34,12 @@ MARKUPMAP(address, New_HyperText, roles::GROUPING)
MARKUPMAP(article, New_HyperText, roles::ARTICLE, Attr(xmlroles, article))
-MARKUPMAP(aside, New_HyperText, roles::LANDMARK)
+MARKUPMAP(
+ aside,
+ [](Element* aElement, LocalAccessible* aContext) -> LocalAccessible* {
+ return new HTMLAsideAccessible(aElement, aContext->Document());
+ },
+ 0)
MARKUPMAP(blockquote, New_HyperText, roles::BLOCKQUOTE)
diff --git a/accessible/base/Platform.h b/accessible/base/Platform.h
index 23f214246f..68529d176a 100644
--- a/accessible/base/Platform.h
+++ b/accessible/base/Platform.h
@@ -47,10 +47,10 @@ EPlatformDisabledState PlatformDisabledState();
void PreInit();
#endif
-#if defined(MOZ_ACCESSIBILITY_ATK) || defined(XP_MACOSX)
+#if defined(MOZ_ACCESSIBILITY_ATK) || defined(XP_DARWIN)
/**
* Is platform accessibility enabled.
- * Only used on linux with atk and MacOS for now.
+ * Only used on Linux, MacOS and iOS for now.
*/
bool ShouldA11yBeEnabled();
#endif
diff --git a/accessible/base/RoleMap.h b/accessible/base/RoleMap.h
index ce82000188..58cbb82165 100644
--- a/accessible/base/RoleMap.h
+++ b/accessible/base/RoleMap.h
@@ -17,6 +17,7 @@ ROLE(NOTHING,
ROLE_SYSTEM_CLIENT,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::No,
eNameFromSubtreeIfReqRule)
ROLE(MENUBAR,
@@ -28,6 +29,7 @@ ROLE(MENUBAR,
ROLE_SYSTEM_MENUBAR,
ROLE_SYSTEM_MENUBAR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(SCROLLBAR,
@@ -39,6 +41,7 @@ ROLE(SCROLLBAR,
ROLE_SYSTEM_SCROLLBAR,
ROLE_SYSTEM_SCROLLBAR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromValueRule)
ROLE(ALERT,
@@ -50,6 +53,7 @@ ROLE(ALERT,
ROLE_SYSTEM_ALERT,
ROLE_SYSTEM_ALERT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(INTERNAL_FRAME,
@@ -61,6 +65,7 @@ ROLE(INTERNAL_FRAME,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_INTERNAL_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MENUPOPUP,
@@ -72,6 +77,7 @@ ROLE(MENUPOPUP,
ROLE_SYSTEM_MENUPOPUP,
ROLE_SYSTEM_MENUPOPUP,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MENUITEM,
@@ -83,6 +89,7 @@ ROLE(MENUITEM,
ROLE_SYSTEM_MENUITEM,
ROLE_SYSTEM_MENUITEM,
java::SessionAccessibility::CLASSNAME_MENUITEM,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(TOOLTIP,
@@ -94,6 +101,7 @@ ROLE(TOOLTIP,
ROLE_SYSTEM_TOOLTIP,
ROLE_SYSTEM_TOOLTIP,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(APPLICATION,
@@ -105,6 +113,7 @@ ROLE(APPLICATION,
ROLE_SYSTEM_APPLICATION,
ROLE_SYSTEM_APPLICATION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(DOCUMENT,
@@ -116,6 +125,7 @@ ROLE(DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
/**
@@ -136,6 +146,7 @@ ROLE(PANE,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(DIALOG,
@@ -147,6 +158,7 @@ ROLE(DIALOG,
ROLE_SYSTEM_DIALOG,
ROLE_SYSTEM_DIALOG,
java::SessionAccessibility::CLASSNAME_DIALOG,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(GROUPING,
@@ -158,6 +170,7 @@ ROLE(GROUPING,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(SEPARATOR,
@@ -169,6 +182,7 @@ ROLE(SEPARATOR,
ROLE_SYSTEM_SEPARATOR,
ROLE_SYSTEM_SEPARATOR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNoNameRule)
ROLE(TOOLBAR,
@@ -180,6 +194,7 @@ ROLE(TOOLBAR,
ROLE_SYSTEM_TOOLBAR,
ROLE_SYSTEM_TOOLBAR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(STATUSBAR,
@@ -191,6 +206,7 @@ ROLE(STATUSBAR,
ROLE_SYSTEM_STATUSBAR,
ROLE_SYSTEM_STATUSBAR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(TABLE,
@@ -202,6 +218,7 @@ ROLE(TABLE,
ROLE_SYSTEM_TABLE,
ROLE_SYSTEM_TABLE,
java::SessionAccessibility::CLASSNAME_GRIDVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(COLUMNHEADER,
@@ -213,6 +230,7 @@ ROLE(COLUMNHEADER,
ROLE_SYSTEM_COLUMNHEADER,
ROLE_SYSTEM_COLUMNHEADER,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(ROWHEADER,
@@ -224,6 +242,7 @@ ROLE(ROWHEADER,
ROLE_SYSTEM_ROWHEADER,
ROLE_SYSTEM_ROWHEADER,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(ROW,
@@ -235,6 +254,7 @@ ROLE(ROW,
ROLE_SYSTEM_ROW,
ROLE_SYSTEM_ROW,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(CELL,
@@ -246,6 +266,7 @@ ROLE(CELL,
ROLE_SYSTEM_CELL,
ROLE_SYSTEM_CELL,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(LINK,
@@ -257,6 +278,7 @@ ROLE(LINK,
ROLE_SYSTEM_LINK,
ROLE_SYSTEM_LINK,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfBrokenUp,
eNameFromSubtreeRule)
ROLE(LIST,
@@ -268,6 +290,7 @@ ROLE(LIST,
ROLE_SYSTEM_LIST,
ROLE_SYSTEM_LIST,
java::SessionAccessibility::CLASSNAME_LISTVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(LISTITEM,
@@ -279,6 +302,7 @@ ROLE(LISTITEM,
ROLE_SYSTEM_LISTITEM,
ROLE_SYSTEM_LISTITEM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(OUTLINE,
@@ -290,6 +314,7 @@ ROLE(OUTLINE,
ROLE_SYSTEM_OUTLINE,
ROLE_SYSTEM_OUTLINE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(OUTLINEITEM,
@@ -301,6 +326,7 @@ ROLE(OUTLINEITEM,
ROLE_SYSTEM_OUTLINEITEM,
ROLE_SYSTEM_OUTLINEITEM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(PAGETAB,
@@ -312,6 +338,7 @@ ROLE(PAGETAB,
ROLE_SYSTEM_PAGETAB,
ROLE_SYSTEM_PAGETAB,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(PROPERTYPAGE,
@@ -323,6 +350,7 @@ ROLE(PROPERTYPAGE,
ROLE_SYSTEM_PROPERTYPAGE,
ROLE_SYSTEM_PROPERTYPAGE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(GRAPHIC,
@@ -334,6 +362,7 @@ ROLE(GRAPHIC,
ROLE_SYSTEM_GRAPHIC,
ROLE_SYSTEM_GRAPHIC,
java::SessionAccessibility::CLASSNAME_IMAGE,
+ IsAccessibilityElementRule::Yes,
eNoNameRule)
ROLE(STATICTEXT,
@@ -345,6 +374,7 @@ ROLE(STATICTEXT,
ROLE_SYSTEM_STATICTEXT,
ROLE_SYSTEM_STATICTEXT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfParentIsntElementWithName,
eNoNameRule)
ROLE(TEXT_LEAF,
@@ -356,6 +386,7 @@ ROLE(TEXT_LEAF,
ROLE_SYSTEM_TEXT,
ROLE_SYSTEM_TEXT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfParentIsntElementWithName,
eNoNameRule)
ROLE(PUSHBUTTON,
@@ -367,6 +398,7 @@ ROLE(PUSHBUTTON,
ROLE_SYSTEM_PUSHBUTTON,
ROLE_SYSTEM_PUSHBUTTON,
java::SessionAccessibility::CLASSNAME_BUTTON,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(CHECKBUTTON,
@@ -378,6 +410,7 @@ ROLE(CHECKBUTTON,
ROLE_SYSTEM_CHECKBUTTON,
ROLE_SYSTEM_CHECKBUTTON,
java::SessionAccessibility::CLASSNAME_CHECKBOX,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(RADIOBUTTON,
@@ -389,6 +422,7 @@ ROLE(RADIOBUTTON,
ROLE_SYSTEM_RADIOBUTTON,
ROLE_SYSTEM_RADIOBUTTON,
java::SessionAccessibility::CLASSNAME_RADIOBUTTON,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
// Equivalent of HTML select element with size="1". See also EDITCOMBOBOX.
@@ -401,6 +435,7 @@ ROLE(COMBOBOX,
ROLE_SYSTEM_COMBOBOX,
ROLE_SYSTEM_COMBOBOX,
java::SessionAccessibility::CLASSNAME_SPINNER,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(PROGRESSBAR,
@@ -412,6 +447,7 @@ ROLE(PROGRESSBAR,
ROLE_SYSTEM_PROGRESSBAR,
ROLE_SYSTEM_PROGRESSBAR,
java::SessionAccessibility::CLASSNAME_PROGRESSBAR,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(SLIDER,
@@ -423,6 +459,7 @@ ROLE(SLIDER,
ROLE_SYSTEM_SLIDER,
ROLE_SYSTEM_SLIDER,
java::SessionAccessibility::CLASSNAME_SEEKBAR,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(SPINBUTTON,
@@ -434,6 +471,7 @@ ROLE(SPINBUTTON,
ROLE_SYSTEM_SPINBUTTON,
ROLE_SYSTEM_SPINBUTTON,
java::SessionAccessibility::CLASSNAME_EDITTEXT,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(DIAGRAM,
@@ -445,6 +483,7 @@ ROLE(DIAGRAM,
ROLE_SYSTEM_DIAGRAM,
ROLE_SYSTEM_DIAGRAM,
java::SessionAccessibility::CLASSNAME_IMAGE,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(ANIMATION,
@@ -456,6 +495,7 @@ ROLE(ANIMATION,
ROLE_SYSTEM_ANIMATION,
ROLE_SYSTEM_ANIMATION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(BUTTONDROPDOWN,
@@ -467,6 +507,7 @@ ROLE(BUTTONDROPDOWN,
ROLE_SYSTEM_BUTTONDROPDOWN,
ROLE_SYSTEM_BUTTONDROPDOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(BUTTONMENU,
@@ -478,6 +519,7 @@ ROLE(BUTTONMENU,
ROLE_SYSTEM_BUTTONMENU,
ROLE_SYSTEM_BUTTONMENU,
java::SessionAccessibility::CLASSNAME_SPINNER,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(WHITESPACE,
@@ -489,6 +531,7 @@ ROLE(WHITESPACE,
ROLE_SYSTEM_WHITESPACE,
ROLE_SYSTEM_WHITESPACE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::No,
eNoNameRule)
ROLE(PAGETABLIST,
@@ -500,6 +543,7 @@ ROLE(PAGETABLIST,
ROLE_SYSTEM_PAGETABLIST,
ROLE_SYSTEM_PAGETABLIST,
java::SessionAccessibility::CLASSNAME_TABWIDGET,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CANVAS,
@@ -511,6 +555,7 @@ ROLE(CANVAS,
ROLE_SYSTEM_GRAPHIC,
IA2_ROLE_CANVAS,
java::SessionAccessibility::CLASSNAME_IMAGE,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CHECK_MENU_ITEM,
@@ -522,6 +567,7 @@ ROLE(CHECK_MENU_ITEM,
ROLE_SYSTEM_MENUITEM,
IA2_ROLE_CHECK_MENU_ITEM,
java::SessionAccessibility::CLASSNAME_MENUITEM,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(DATE_EDITOR,
@@ -533,6 +579,7 @@ ROLE(DATE_EDITOR,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_DATE_EDITOR,
java::SessionAccessibility::CLASSNAME_SPINNER,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CHROME_WINDOW,
@@ -544,6 +591,7 @@ ROLE(CHROME_WINDOW,
ROLE_SYSTEM_APPLICATION,
IA2_ROLE_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(LABEL,
@@ -555,6 +603,7 @@ ROLE(LABEL,
ROLE_SYSTEM_STATICTEXT,
IA2_ROLE_LABEL,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(PASSWORD_TEXT,
@@ -566,6 +615,7 @@ ROLE(PASSWORD_TEXT,
ROLE_SYSTEM_TEXT,
ROLE_SYSTEM_TEXT,
java::SessionAccessibility::CLASSNAME_EDITTEXT,
+ IsAccessibilityElementRule::Yes,
eNoNameRule)
ROLE(RADIO_MENU_ITEM,
@@ -577,6 +627,7 @@ ROLE(RADIO_MENU_ITEM,
ROLE_SYSTEM_MENUITEM,
IA2_ROLE_RADIO_MENU_ITEM,
java::SessionAccessibility::CLASSNAME_MENUITEM,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(TEXT_CONTAINER,
@@ -588,6 +639,7 @@ ROLE(TEXT_CONTAINER,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(TOGGLE_BUTTON,
@@ -599,6 +651,7 @@ ROLE(TOGGLE_BUTTON,
ROLE_SYSTEM_PUSHBUTTON,
IA2_ROLE_TOGGLE_BUTTON,
java::SessionAccessibility::CLASSNAME_TOGGLEBUTTON,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(TREE_TABLE,
@@ -610,6 +663,7 @@ ROLE(TREE_TABLE,
ROLE_SYSTEM_OUTLINE,
ROLE_SYSTEM_OUTLINE,
java::SessionAccessibility::CLASSNAME_GRIDVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(PARAGRAPH,
@@ -621,6 +675,7 @@ ROLE(PARAGRAPH,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_PARAGRAPH,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(ENTRY,
@@ -632,6 +687,7 @@ ROLE(ENTRY,
ROLE_SYSTEM_TEXT,
ROLE_SYSTEM_TEXT,
java::SessionAccessibility::CLASSNAME_EDITTEXT,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(CAPTION,
@@ -643,6 +699,7 @@ ROLE(CAPTION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_CAPTION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(NON_NATIVE_DOCUMENT,
@@ -654,6 +711,7 @@ ROLE(NON_NATIVE_DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(HEADING,
@@ -665,6 +723,7 @@ ROLE(HEADING,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_HEADING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildless,
eNameFromSubtreeRule)
ROLE(SECTION,
@@ -676,6 +735,7 @@ ROLE(SECTION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_SECTION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(FORM,
@@ -687,6 +747,7 @@ ROLE(FORM,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_FORM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(APP_ROOT,
@@ -698,6 +759,7 @@ ROLE(APP_ROOT,
ROLE_SYSTEM_APPLICATION,
ROLE_SYSTEM_APPLICATION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(PARENT_MENUITEM,
@@ -709,6 +771,7 @@ ROLE(PARENT_MENUITEM,
ROLE_SYSTEM_MENUITEM,
ROLE_SYSTEM_MENUITEM,
java::SessionAccessibility::CLASSNAME_MENUITEM,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(COMBOBOX_LIST,
@@ -720,6 +783,7 @@ ROLE(COMBOBOX_LIST,
ROLE_SYSTEM_LIST,
ROLE_SYSTEM_LIST,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::No,
eNoNameRule)
ROLE(COMBOBOX_OPTION,
@@ -731,6 +795,7 @@ ROLE(COMBOBOX_OPTION,
ROLE_SYSTEM_LISTITEM,
ROLE_SYSTEM_LISTITEM,
java::SessionAccessibility::CLASSNAME_MENUITEM,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(IMAGE_MAP,
@@ -742,6 +807,7 @@ ROLE(IMAGE_MAP,
ROLE_SYSTEM_GRAPHIC,
ROLE_SYSTEM_GRAPHIC,
java::SessionAccessibility::CLASSNAME_IMAGE,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(OPTION,
@@ -753,6 +819,7 @@ ROLE(OPTION,
ROLE_SYSTEM_LISTITEM,
ROLE_SYSTEM_LISTITEM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(RICH_OPTION,
@@ -764,6 +831,7 @@ ROLE(RICH_OPTION,
ROLE_SYSTEM_LISTITEM,
ROLE_SYSTEM_LISTITEM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(LISTBOX,
@@ -775,7 +843,8 @@ ROLE(LISTBOX,
ROLE_SYSTEM_LIST,
ROLE_SYSTEM_LIST,
java::SessionAccessibility::CLASSNAME_LISTVIEW,
- eNoNameRule)
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
+ eNameFromValueRule)
ROLE(FLAT_EQUATION,
"flat equation",
@@ -786,6 +855,7 @@ ROLE(FLAT_EQUATION,
ROLE_SYSTEM_EQUATION,
ROLE_SYSTEM_EQUATION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNoNameRule)
ROLE(GRID_CELL,
@@ -797,6 +867,7 @@ ROLE(GRID_CELL,
ROLE_SYSTEM_CELL,
ROLE_SYSTEM_CELL,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(NOTE,
@@ -808,6 +879,7 @@ ROLE(NOTE,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_NOTE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(FIGURE,
@@ -819,6 +891,7 @@ ROLE(FIGURE,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CHECK_RICH_OPTION,
@@ -830,6 +903,7 @@ ROLE(CHECK_RICH_OPTION,
ROLE_SYSTEM_CHECKBUTTON,
ROLE_SYSTEM_CHECKBUTTON,
java::SessionAccessibility::CLASSNAME_CHECKBOX,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(DEFINITION_LIST,
@@ -841,6 +915,7 @@ ROLE(DEFINITION_LIST,
ROLE_SYSTEM_LIST,
ROLE_SYSTEM_LIST,
java::SessionAccessibility::CLASSNAME_LISTVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(TERM,
@@ -852,6 +927,7 @@ ROLE(TERM,
ROLE_SYSTEM_LISTITEM,
ROLE_SYSTEM_LISTITEM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(DEFINITION,
@@ -863,6 +939,7 @@ ROLE(DEFINITION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_PARAGRAPH,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(KEY,
@@ -874,6 +951,7 @@ ROLE(KEY,
ROLE_SYSTEM_PUSHBUTTON,
ROLE_SYSTEM_PUSHBUTTON,
java::SessionAccessibility::CLASSNAME_BUTTON,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(SWITCH,
@@ -885,6 +963,7 @@ ROLE(SWITCH,
ROLE_SYSTEM_CHECKBUTTON,
IA2_ROLE_TOGGLE_BUTTON,
java::SessionAccessibility::CLASSNAME_CHECKBOX,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(MATHML_MATH,
@@ -896,6 +975,7 @@ ROLE(MATHML_MATH,
ROLE_SYSTEM_EQUATION,
ROLE_SYSTEM_EQUATION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_IDENTIFIER,
@@ -907,6 +987,7 @@ ROLE(MATHML_IDENTIFIER,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_NUMBER,
@@ -918,6 +999,7 @@ ROLE(MATHML_NUMBER,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_OPERATOR,
@@ -934,6 +1016,7 @@ ROLE(MATHML_OPERATOR,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_TEXT,
@@ -945,6 +1028,7 @@ ROLE(MATHML_TEXT,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_STRING_LITERAL,
@@ -956,6 +1040,7 @@ ROLE(MATHML_STRING_LITERAL,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_GLYPH,
@@ -967,6 +1052,7 @@ ROLE(MATHML_GLYPH,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_IMAGE,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeRule)
ROLE(MATHML_ROW,
@@ -978,6 +1064,7 @@ ROLE(MATHML_ROW,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_FRACTION,
@@ -989,6 +1076,7 @@ ROLE(MATHML_FRACTION,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_SQUARE_ROOT,
@@ -1000,6 +1088,7 @@ ROLE(MATHML_SQUARE_ROOT,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_ROOT,
@@ -1011,6 +1100,7 @@ ROLE(MATHML_ROOT,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_ENCLOSED,
@@ -1022,6 +1112,7 @@ ROLE(MATHML_ENCLOSED,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STYLE,
@@ -1033,6 +1124,7 @@ ROLE(MATHML_STYLE,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_SUB,
@@ -1044,6 +1136,7 @@ ROLE(MATHML_SUB,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_SUP,
@@ -1055,6 +1148,7 @@ ROLE(MATHML_SUP,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_SUB_SUP,
@@ -1066,6 +1160,7 @@ ROLE(MATHML_SUB_SUP,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_UNDER,
@@ -1077,6 +1172,7 @@ ROLE(MATHML_UNDER,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_OVER,
@@ -1088,6 +1184,7 @@ ROLE(MATHML_OVER,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_UNDER_OVER,
@@ -1099,6 +1196,7 @@ ROLE(MATHML_UNDER_OVER,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_MULTISCRIPTS,
@@ -1110,6 +1208,7 @@ ROLE(MATHML_MULTISCRIPTS,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_TABLE,
@@ -1121,6 +1220,7 @@ ROLE(MATHML_TABLE,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_GRIDVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_LABELED_ROW,
@@ -1132,6 +1232,7 @@ ROLE(MATHML_LABELED_ROW,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_TABLE_ROW,
@@ -1143,6 +1244,7 @@ ROLE(MATHML_TABLE_ROW,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_CELL,
@@ -1154,6 +1256,7 @@ ROLE(MATHML_CELL,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_ACTION,
@@ -1165,6 +1268,7 @@ ROLE(MATHML_ACTION,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_ERROR,
@@ -1176,6 +1280,7 @@ ROLE(MATHML_ERROR,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK,
@@ -1187,6 +1292,7 @@ ROLE(MATHML_STACK,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_LONG_DIVISION,
@@ -1198,6 +1304,7 @@ ROLE(MATHML_LONG_DIVISION,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK_GROUP,
@@ -1209,6 +1316,7 @@ ROLE(MATHML_STACK_GROUP,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK_ROW,
@@ -1220,6 +1328,7 @@ ROLE(MATHML_STACK_ROW,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK_CARRIES,
@@ -1231,6 +1340,7 @@ ROLE(MATHML_STACK_CARRIES,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK_CARRY,
@@ -1242,6 +1352,7 @@ ROLE(MATHML_STACK_CARRY,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MATHML_STACK_LINE,
@@ -1253,6 +1364,7 @@ ROLE(MATHML_STACK_LINE,
0,
IA2_ROLE_UNKNOWN,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(RADIO_GROUP,
@@ -1264,6 +1376,7 @@ ROLE(RADIO_GROUP,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(TEXT,
@@ -1275,6 +1388,7 @@ ROLE(TEXT,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(DETAILS,
@@ -1286,6 +1400,7 @@ ROLE(DETAILS,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(SUMMARY,
@@ -1297,6 +1412,7 @@ ROLE(SUMMARY,
ROLE_SYSTEM_PUSHBUTTON,
ROLE_SYSTEM_PUSHBUTTON,
java::SessionAccessibility::CLASSNAME_BUTTON,
+ IsAccessibilityElementRule::Yes,
eNameFromSubtreeRule)
ROLE(LANDMARK,
@@ -1308,6 +1424,7 @@ ROLE(LANDMARK,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_LANDMARK,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(NAVIGATION,
@@ -1319,6 +1436,7 @@ ROLE(NAVIGATION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_LANDMARK,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(FOOTNOTE,
@@ -1330,6 +1448,7 @@ ROLE(FOOTNOTE,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_FOOTNOTE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(ARTICLE,
@@ -1341,6 +1460,7 @@ ROLE(ARTICLE,
ROLE_SYSTEM_DOCUMENT,
ROLE_SYSTEM_DOCUMENT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(REGION,
@@ -1352,6 +1472,7 @@ ROLE(REGION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_LANDMARK,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
// A composite widget with a text input and popup. Used for ARIA role combobox.
@@ -1365,6 +1486,7 @@ ROLE(EDITCOMBOBOX,
ROLE_SYSTEM_COMBOBOX,
ROLE_SYSTEM_COMBOBOX,
java::SessionAccessibility::CLASSNAME_EDITTEXT,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(BLOCKQUOTE,
@@ -1376,6 +1498,7 @@ ROLE(BLOCKQUOTE,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_BLOCK_QUOTE,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CONTENT_DELETION,
@@ -1387,6 +1510,7 @@ ROLE(CONTENT_DELETION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_CONTENT_DELETION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(CONTENT_INSERTION,
@@ -1398,6 +1522,7 @@ ROLE(CONTENT_INSERTION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_CONTENT_INSERTION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(FORM_LANDMARK,
@@ -1409,6 +1534,7 @@ ROLE(FORM_LANDMARK,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_FORM,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(MARK,
@@ -1420,6 +1546,7 @@ ROLE(MARK,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_MARK,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(SUGGESTION,
@@ -1431,6 +1558,7 @@ ROLE(SUGGESTION,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_SUGGESTION,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(COMMENT,
@@ -1442,6 +1570,7 @@ ROLE(COMMENT,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_COMMENT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(CODE,
@@ -1453,6 +1582,7 @@ ROLE(CODE,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(TIME_EDITOR,
@@ -1464,6 +1594,7 @@ ROLE(TIME_EDITOR,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(LISTITEM_MARKER,
@@ -1475,6 +1606,7 @@ ROLE(LISTITEM_MARKER,
ROLE_SYSTEM_STATICTEXT,
ROLE_SYSTEM_STATICTEXT,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNoNameRule)
ROLE(METER,
@@ -1486,6 +1618,7 @@ ROLE(METER,
ROLE_SYSTEM_PROGRESSBAR,
ROLE_SYSTEM_PROGRESSBAR,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::Yes,
eNameFromValueRule)
ROLE(SUBSCRIPT,
@@ -1497,6 +1630,7 @@ ROLE(SUBSCRIPT,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(SUPERSCRIPT,
@@ -1508,6 +1642,7 @@ ROLE(SUPERSCRIPT,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(EMPHASIS,
@@ -1519,6 +1654,7 @@ ROLE(EMPHASIS,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(STRONG,
@@ -1530,6 +1666,7 @@ ROLE(STRONG,
ROLE_SYSTEM_GROUPING,
IA2_ROLE_TEXT_FRAME,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
ROLE(TIME,
@@ -1541,6 +1678,18 @@ ROLE(TIME,
ROLE_SYSTEM_GROUPING,
ROLE_SYSTEM_GROUPING,
java::SessionAccessibility::CLASSNAME_VIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
eNameFromSubtreeIfReqRule)
+ROLE(GRID,
+ "grid",
+ nsGkAtoms::grid,
+ ATK_ROLE_TABLE,
+ NSAccessibilityTableRole,
+ NSAccessibilityUnknownSubrole,
+ ROLE_SYSTEM_TABLE,
+ ROLE_SYSTEM_TABLE,
+ java::SessionAccessibility::CLASSNAME_GRIDVIEW,
+ IsAccessibilityElementRule::IfChildlessWithNameAndFocusable,
+ eNameFromSubtreeIfReqRule)
// clang-format on
diff --git a/accessible/base/moz.build b/accessible/base/moz.build
index b65c90ceba..de8e75f0e1 100644
--- a/accessible/base/moz.build
+++ b/accessible/base/moz.build
@@ -112,6 +112,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
LOCAL_INCLUDES += [
"/accessible/android",
]
+elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
+ LOCAL_INCLUDES += [
+ "/accessible/ios",
+ ]
else:
LOCAL_INCLUDES += [
"/accessible/other",
diff --git a/accessible/base/nsAccessibilityService.cpp b/accessible/base/nsAccessibilityService.cpp
index c31dd666ce..d38276572b 100644
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -606,6 +606,24 @@ void nsAccessibilityService::NotifyOfDevPixelRatioChange(
}
}
+void nsAccessibilityService::NotifyAttrElementWillChange(
+ mozilla::dom::Element* aElement, nsAtom* aAttr) {
+ mozilla::dom::Document* doc = aElement->OwnerDoc();
+ MOZ_ASSERT(doc);
+ if (DocAccessible* docAcc = GetDocAccessible(doc)) {
+ docAcc->AttrElementWillChange(aElement, aAttr);
+ }
+}
+
+void nsAccessibilityService::NotifyAttrElementChanged(
+ mozilla::dom::Element* aElement, nsAtom* aAttr) {
+ mozilla::dom::Document* doc = aElement->OwnerDoc();
+ MOZ_ASSERT(doc);
+ if (DocAccessible* docAcc = GetDocAccessible(doc)) {
+ docAcc->AttrElementChanged(aElement, aAttr);
+ }
+}
+
LocalAccessible* nsAccessibilityService::GetRootDocumentAccessible(
PresShell* aPresShell, bool aCanCreate) {
PresShell* presShell = aPresShell;
@@ -820,7 +838,7 @@ void nsAccessibilityService::RecreateAccessible(PresShell* aPresShell,
void nsAccessibilityService::GetStringRole(uint32_t aRole, nsAString& aString) {
#define ROLE(geckoRole, stringRole, ariaRole, atkRole, macRole, macSubrole, \
- msaaRole, ia2Role, androidClass, nameRule) \
+ msaaRole, ia2Role, androidClass, iosIsElement, nameRule) \
case roles::geckoRole: \
aString.AssignLiteral(stringRole); \
return;
@@ -1504,8 +1522,8 @@ bool nsAccessibilityService::Init() {
NS_ADDREF(gApplicationAccessible); // will release in Shutdown()
gApplicationAccessible->Init();
- CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::Accessibility,
- "Active"_ns);
+ CrashReporter::RecordAnnotationCString(
+ CrashReporter::Annotation::Accessibility, "Active");
// Now its safe to start platform accessibility.
if (XRE_IsParentProcess()) PlatformInit();
diff --git a/accessible/base/nsAccessibilityService.h b/accessible/base/nsAccessibilityService.h
index 0b3f172f89..77b56f2fc1 100644
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -244,6 +244,19 @@ class nsAccessibilityService final : public mozilla::a11y::DocManager,
void NotifyOfDevPixelRatioChange(mozilla::PresShell* aPresShell,
int32_t aAppUnitsPerDevPixel);
+ /**
+ * Notify accessibility that an element explicitly set for an attribute is
+ * about to change. See dom::Element::ExplicitlySetAttrElement.
+ */
+ void NotifyAttrElementWillChange(mozilla::dom::Element* aElement,
+ nsAtom* aAttr);
+
+ /**
+ * Notify accessibility that an element explicitly set for an attribute has
+ * changed. See dom::Element::ExplicitlySetAttrElement.
+ */
+ void NotifyAttrElementChanged(mozilla::dom::Element* aElement, nsAtom* aAttr);
+
// nsAccessibiltiyService
/**
diff --git a/accessible/base/nsCoreUtils.cpp b/accessible/base/nsCoreUtils.cpp
index 80739bb401..c5e89258fa 100644
--- a/accessible/base/nsCoreUtils.cpp
+++ b/accessible/base/nsCoreUtils.cpp
@@ -35,6 +35,7 @@
#include "nsTreeColumns.h"
#include "mozilla/dom/DocumentInlines.h"
#include "mozilla/dom/Element.h"
+#include "mozilla/dom/ElementInternals.h"
#include "mozilla/dom/HTMLLabelElement.h"
#include "mozilla/dom/MouseEventBinding.h"
#include "mozilla/dom/Selection.h"
@@ -546,6 +547,32 @@ bool nsCoreUtils::IsWhitespaceString(const nsAString& aString) {
return iterBegin == iterEnd;
}
+void nsCoreUtils::TrimNonBreakingSpaces(nsAString& aString) {
+ if (aString.IsEmpty()) {
+ return;
+ }
+
+ // Find the index past the last nbsp prefix character.
+ constexpr char16_t nbsp{0xA0};
+ size_t startIndex = 0;
+ while (aString.CharAt(startIndex) == nbsp) {
+ startIndex++;
+ }
+
+ // Find the index before the first nbsp suffix character.
+ size_t endIndex = aString.Length() - 1;
+ while (endIndex > startIndex && aString.CharAt(endIndex) == nbsp) {
+ endIndex--;
+ }
+ if (startIndex > endIndex) {
+ aString.Truncate();
+ return;
+ }
+
+ // Trim the string down, removing the non-breaking space characters.
+ aString = Substring(aString, startIndex, endIndex - startIndex + 1);
+}
+
bool nsCoreUtils::AccEventObserversExist() {
nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
NS_ENSURE_TRUE(obsService, false);
@@ -620,3 +647,34 @@ bool nsCoreUtils::IsDocumentVisibleConsideringInProcessAncestors(
} while ((parent = parent->GetInProcessParentDocument()));
return true;
}
+
+bool nsCoreUtils::IsDescendantOfAnyShadowIncludingAncestor(
+ nsINode* aDescendant, nsINode* aStartAncestor) {
+ const nsINode* descRoot = aDescendant->SubtreeRoot();
+ nsINode* ancRoot = aStartAncestor->SubtreeRoot();
+ for (;;) {
+ if (ancRoot == descRoot) {
+ return true;
+ }
+ auto* shadow = mozilla::dom::ShadowRoot::FromNode(ancRoot);
+ if (!shadow || !shadow->GetHost()) {
+ break;
+ }
+ ancRoot = shadow->GetHost()->SubtreeRoot();
+ }
+ return false;
+}
+
+Element* nsCoreUtils::GetAriaActiveDescendantElement(Element* aElement) {
+ if (Element* activeDescendant = aElement->GetAriaActiveDescendantElement()) {
+ return activeDescendant;
+ }
+
+ if (auto* element = nsGenericHTMLElement::FromNode(aElement)) {
+ if (auto* internals = element->GetInternals()) {
+ return internals->GetAriaActiveDescendantElement();
+ }
+ }
+
+ return nullptr;
+}
diff --git a/accessible/base/nsCoreUtils.h b/accessible/base/nsCoreUtils.h
index 2c3e7330ff..5e77d6bfe0 100644
--- a/accessible/base/nsCoreUtils.h
+++ b/accessible/base/nsCoreUtils.h
@@ -30,6 +30,7 @@ namespace mozilla {
class PresShell;
namespace dom {
class Document;
+class Element;
class XULTreeElement;
} // namespace dom
} // namespace mozilla
@@ -41,6 +42,7 @@ class nsCoreUtils {
public:
typedef mozilla::PresShell PresShell;
typedef mozilla::dom::Document Document;
+ typedef mozilla::dom::Element Element;
/**
* Return true if the given node is a label of a control.
@@ -305,6 +307,11 @@ class nsCoreUtils {
aChar == 0xa0;
}
+ /**
+ * Remove non-breaking spaces from the beginning and end of the string.
+ */
+ static void TrimNonBreakingSpaces(nsAString& aString);
+
/*
* Return true if there are any observers of accessible events.
*/
@@ -324,6 +331,15 @@ class nsCoreUtils {
*/
static bool IsDocumentVisibleConsideringInProcessAncestors(
const Document* aDocument);
+
+ /**
+ * Return true if `aDescendant` is a descendant of any of `aStartAncestor`'s
+ * shadow-including ancestors.
+ */
+ static bool IsDescendantOfAnyShadowIncludingAncestor(nsINode* aDescendant,
+ nsINode* aStartAncestor);
+
+ static Element* GetAriaActiveDescendantElement(Element* aElement);
};
#endif
diff --git a/accessible/base/nsTextEquivUtils.cpp b/accessible/base/nsTextEquivUtils.cpp
index d95229c1dc..f222930981 100644
--- a/accessible/base/nsTextEquivUtils.cpp
+++ b/accessible/base/nsTextEquivUtils.cpp
@@ -177,6 +177,16 @@ nsresult nsTextEquivUtils::AppendFromAccessible(Accessible* aAccessible,
bool isEmptyTextEquiv = true;
+ // Attempt to find the value. If it's non-empty, append and return it. See the
+ // "embedded control" section of the name spec.
+ nsAutoString val;
+ nsresult rv = AppendFromValue(aAccessible, &val);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (rv == NS_OK) {
+ AppendString(aString, val);
+ return NS_OK;
+ }
+
// If the name is from tooltip then append it to result string in the end
// (see h. step of name computation guide).
nsAutoString text;
@@ -184,12 +194,6 @@ nsresult nsTextEquivUtils::AppendFromAccessible(Accessible* aAccessible,
isEmptyTextEquiv = !AppendString(aString, text);
}
- // Implementation of f. step.
- nsresult rv = AppendFromValue(aAccessible, aString);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (rv != NS_OK_NO_NAME_CLAUSE_HANDLED) isEmptyTextEquiv = false;
-
// Implementation of g) step of text equivalent computation guide. Go down
// into subtree if accessible allows "text equivalent from subtree rule" or
// it's not root and not control.
@@ -230,6 +234,19 @@ nsresult nsTextEquivUtils::AppendFromValue(Accessible* aAccessible,
nsAutoString text;
if (aAccessible != sInitiatorAcc) {
+ // For listboxes in non-initiator computations, we need to get the selected
+ // item and append its text alternative.
+ if (aAccessible->IsListControl()) {
+ Accessible* selected = aAccessible->GetSelectedItem(0);
+ if (selected) {
+ nsresult rv = AppendFromAccessible(selected, &text);
+ NS_ENSURE_SUCCESS(rv, rv);
+ return AppendString(aString, text) ? NS_OK
+ : NS_OK_NO_NAME_CLAUSE_HANDLED;
+ }
+ return NS_ERROR_FAILURE;
+ }
+
aAccessible->Value(text);
return AppendString(aString, text) ? NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
@@ -306,7 +323,7 @@ bool nsTextEquivUtils::AppendString(nsAString* aString,
uint32_t nsTextEquivUtils::GetRoleRule(role aRole) {
#define ROLE(geckoRole, stringRole, ariaRole, atkRole, macRole, macSubrole, \
- msaaRole, ia2Role, androidClass, nameRule) \
+ msaaRole, ia2Role, androidClass, iosIsElement, nameRule) \
case roles::geckoRole: \
return nameRule;