Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#100 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
accessibility, mobile-dev

Hướng nghiên cứu

Bắt đầu với lib/hooks/useFocus.ts và tái hiện hành vi được báo cáo bằng cách sử dụng repository mẫu được liên kết hoặc ví dụ useFocus trong tài liệu trên trình mô phỏng iOS có VoiceOver. So sánh kết quả trên trình mô phỏng với iPhone thật, sau đó xác định liệu lệnh gọi AccessibilityInfo.setAccessibilityFocus bị trùng hay hành vi của trình mô phỏng có giải thích được vấn đề hay không; hoàn tất khi đã xác nhận được nguyên nhân và thống nhất về bản sửa lỗi hoặc nội dung làm rõ trong tài liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
TypeScript
Star
295
Fork
22
Merge trung bình
20 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của FormidableLabs/react-native-ama

Tất cả issue của FormidableLabs/react-native-ama

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.