Skip to content

Commit 07160ba

Browse files
committed
Don't mirror isAccessibilityElement on _ASTableViewCell
This is a partial revert of #1941 The change in #1941 has caused some issues for us and others (see #1997). If I set `myNode.isAccessibilityElement = true,` then what ends up happening is that the table cell wrapper view (_ASTableViewCell) also has `isAccessibilityElement = true`. But then when iOS goes through the hierarchy it identifies the table cell wrapper view as the target and attempts to use that accessibilityLabel, which doesn't exist (because it's actually on the nested node view). So our node's label is never used. I'm not sure why setting `isAccessibilityElement` in `_ASTableViewCell` was necessary in #1941 in order to make a node non-accessible, since the default value is already false.
1 parent e3bdf89 commit 07160ba

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Source/ASTableView.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ - (void)setElement:(ASCollectionElement *)element
116116
self.selectionStyle = node.selectionStyle;
117117
self.focusStyle = node.focusStyle;
118118
self.accessoryType = node.accessoryType;
119-
self.isAccessibilityElement = node.isAccessibilityElement;
120119
self.accessibilityElementsHidden = node.accessibilityElementsHidden;
121120
// the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)
122121
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view

0 commit comments

Comments
 (0)