react / react/react-native

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

オープン
#39,052 コメント 7 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

API: Keyboard Issue: Author Provided Repro Needs: Triage :mag:
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、リンクされている2つの Expo Snack の例を使って、ハードウェアキーボードを接続した実機の Android および iOS デバイスで動作を再現します。「Send focus」ボタンをアクティブ化したときにフォーカスがどのように処理されるかを追跡し、スクリーンリーダーを有効にしていない状態でフォーカスが「Receive focus」ボタンに移動することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
accessibility, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。