Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

useFocus does not seem to work in the iOS simulator (tested with VoiceOver)

Open
#100 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
react-native, typescript

Research direction

Start with lib/hooks/useFocus.ts and reproduce the reported behavior using the linked sample repository or the useFocus example from the documentation in an iOS simulator with VoiceOver. Compare the simulator result with a physical iPhone, then determine whether the duplicate AccessibilityInfo.setAccessibilityFocus call or simulator behavior explains the issue; done means a confirmed cause and an agreed fix or documentation clarification.

Written by the indexing model from the issue text.

Description

Sample git repo
Snack that doesn't work because it can't install react-native-ama but it is the example from the docs.

I have tried to use useFocus on two different projects (and machines), and neither work with the IOS simulator. I built a further third project and was able to run it on my personal iPhone with voiceover and it seemed to work. It does seem to work on a physical device fine.

Is there anything that can be done about this for those of us who use the IOS simulator as their primary development device?

I even copy/pasted the useFocus code and tried it as a standalone hook since it doesn't rely on anything from the <AMAProvider>. Same thing.

Any help would be appreciated.
Thank you!

Additional question:
Why is AccessibilityInfo.setAccessibilityFocus(elementId); ran twice in useFocus?

Dominant language
TypeScript
Stars
295
Forks
22
Avg merge
20m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FormidableLabs/react-native-ama

All issues in FormidableLabs/react-native-ama

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.