Skip to content

Commit

Permalink
Adding back the Accessibility Actions that were mistakenly remove in … (
Browse files Browse the repository at this point in the history
facebook#81)

* Adding back the Accessibility Actions that were mistakenly remove in the last merge - RN57

* Add back performAccessibilityAction that was accidentaly removed during merge on RN57

* Adding More methods removed during last Merge on RN57
  • Loading branch information
NicholasCouri authored and msftbot[bot] committed May 29, 2019
1 parent 5fe9c4f commit 02ce26f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,14 @@ public void sendAccessibilityEvent(int tag, int eventType) {
mOperationsQueue.enqueueSendAccessibilityEvent(tag, eventType);
}

public void performAccessibilityAction(int tag, int action) {
mOperationsQueue.enqueuePerformAccessibilityAction(tag, action);
}

public void announceForAccessibility(int tag, String announcement) {
mOperationsQueue.enqueueAnnounceForAccessibility(tag, announcement);
}

public void onHostResume() {
mOperationsQueue.resumeFrameCallback();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,16 @@ public void sendAccessibilityEvent(int tag, int eventType) {
mUIImplementation.sendAccessibilityEvent(tag, eventType);
}

@ReactMethod
public void performAccessibilityAction(int tag, int action) {
mUIImplementation.performAccessibilityAction(tag, action);
}

@ReactMethod
public void announceForAccessibility(int tag, String announcement) {
mUIImplementation.announceForAccessibility(tag, announcement);
}

/**
* Schedule a block to be executed on the UI thread. Useful if you need to execute view logic
* after all currently queued view updates have completed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,14 @@ public void enqueueSendAccessibilityEvent(int tag, int eventType) {
mOperations.add(new SendAccessibilityEvent(tag, eventType));
}

public void enqueuePerformAccessibilityAction(int tag, int action) {
mOperations.add(new PerformAccessibilityAction(tag, action));
}

public void enqueueAnnounceForAccessibility(int tag, String announcement) {
mOperations.add(new AnnounceForAccessibility(tag, announcement));
}

public void enqueueLayoutUpdateFinished(ReactShadowNode node, UIImplementation.LayoutUpdateListener listener) {
mOperations.add(new LayoutUpdateFinishedOperation(node, listener));
}
Expand Down

0 comments on commit 02ce26f

Please sign in to comment.