Skip to content

Commit

Permalink
fix SR does not announces disabled with Text
Browse files Browse the repository at this point in the history
Adding the prop `accessible` to `ReactTextAnchorViewManager` fixes the problem for this component.
The same solution from my previous pr #30935 (comment).

See test case at fabOnReact/react-native-notes#1 (comment)
  • Loading branch information
fabOnReact committed Feb 9, 2022
1 parent 7ef14af commit 666647e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public abstract class ReactTextAnchorViewManager<T extends View, C extends React
};
private static final String TAG = "ReactTextAnchorViewManager";

@ReactProp(name = "accessible")
public void setAccessible(ReactTextView view, boolean accessible) {
view.setFocusable(accessible);
}

// maxLines can only be set in master view (block), doesn't really make sense to set in a span
@ReactProp(name = ViewProps.NUMBER_OF_LINES, defaultInt = ViewDefaults.NUMBER_OF_LINES)
public void setNumberOfLines(ReactTextView view, int numberOfLines) {
Expand Down

0 comments on commit 666647e

Please sign in to comment.