Skip to content

Commit

Permalink
Don't mirror isAccessibilityElement on _ASTableViewCell
Browse files Browse the repository at this point in the history
This is a partial revert of TextureGroup#1941

The change in TextureGroup#1941 has caused some issues for us and others (see TextureGroup#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 TextureGroup#1941 in order to make a node non-accessible,
since the default value is already false.
  • Loading branch information
bdolman committed Apr 18, 2022
1 parent e3bdf89 commit 07160ba
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Source/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ - (void)setElement:(ASCollectionElement *)element
self.selectionStyle = node.selectionStyle;
self.focusStyle = node.focusStyle;
self.accessoryType = node.accessoryType;
self.isAccessibilityElement = node.isAccessibilityElement;
self.accessibilityElementsHidden = node.accessibilityElementsHidden;
// the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view
Expand Down

0 comments on commit 07160ba

Please sign in to comment.