react / react/react-native

There is no way to manage focus for external keyboard from one element to another

Đang mở
#39,052 7 bình luận 1 reaction 0 người được giao Xem trên GitHub

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

API: Keyboard Issue: Author Provided Repro Needs: Triage :mag:
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

Sometimes we need to set external keyboard focus from one place to another, for instance from one Pressable to another Pressable, or from a Pressable to a View.

For Screen Reader users we can use AccessibilityInfo.setAccessibilityFocus(tag) to manage focus, but this technique does not work for the external keyboard when a screen reader is not switched on.

The standard React method of ref.current.focus() also does not work for external keyboard users on mobile (only web).

React Native Version

0.71.3

Output of npx react-native info

I don't have access to this.

Steps to reproduce

On Android or iOS physical device:

  1. Connect a hardware keyboard to the device using bluetooth.
  2. Open https://snack.expo.dev/@nedgip/external-keyboard-focus-example-1 in Expo Go
  3. Navigate to the Send focus button using arrow keys
  4. Press Space
Expected

Focus should move to the Receive focus button

Actual

Focus remains on the Send focus button

Snack, screenshot, or link to a repository
  1. https://snack.expo.dev/@nedgip/external-keyboard-focus-example-1
  2. https://snack.expo.dev/@nedgip/external-keyboard-focus-example-2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi trên các thiết bị Android và iOS thực có bàn phím phần cứng, sử dụng hai ví dụ Expo Snack được liên kết. Theo dõi cách tiêu điểm được xử lý khi kích hoạt nút “Send focus”, sau đó xác minh rằng tiêu điểm chuyển đến nút “Receive focus” khi không bật trình đọc màn hình.

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

Đánh giá

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

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.