Skip to content

Commit

Permalink
Fix accessibility usage example
Browse files Browse the repository at this point in the history
Summary:
Added missing context and corrected call to superDelegate.

Fixes facebook#453

Reviewed By: astreet

Differential Revision: D13415881

fbshipit-source-id: e2a618d9e1802c67bc1669273ce9d97f979f9910
  • Loading branch information
passy authored and facebook-github-bot committed Dec 11, 2018
1 parent 9836497 commit 1e580ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/_docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ For example, here are the steps for overriding `onInitializeAccessibilityNodeInf
```java
@OnEvent(OnInitializeAccessibilityNodeInfoEvent.class)
static void onInitializeAccessibilityNodeInfoEvent(
ComponentContext c,
@FromEvent AccessibilityDelegateCompat superDelegate,
@FromEvent View host,
@FromEvent AccessibilityNodeInfoCompat info) {
// Equivalent to calling super on a regular AccessibilityDelegate, not required
superDelegate.onInitializeAccessibilityNodeInfo(view, node);
superDelegate.onInitializeAccessibilityNodeInfo(view, info);
// My implementation
}
```
Expand Down

0 comments on commit 1e580ed

Please sign in to comment.