Please document correct usage of accessibilityRole "link"
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react-native
調査の方向性
Issue にリンクされている accessibilityRole のドキュメントから始め、引用されている React Navigation、react-native-accessibility-engine、iOS のガイダンスを比較してください。role の説明を変更する前に、プロジェクトのメンテナーと意図されたプラットフォームの動作を確認してください。ドキュメントに曖昧さのない使用ルールが記載されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Here's the current documentation for accessibilityRole="link":
link Used when the element should be treated as a link.
This... could be more helpful. It's arguably a tautology: it says the link role should be used in those cases where the link role should be used.
There are many examples (some given below) of inconsistent and sometimes contradictory ways this has been interpreted.
What is the problem?
This is a problem because people fill in their own common-sense opinion on how link roles should be used (possibly influenced by non-equivalent experience of links on websites).
For example, I've encountered three different interpretations on how the link role should be used, all from seemingly authoritative sources:
- Navigation between screens: The widely used react-navigation project has utilities like
useLinkPropsthat applyaccessiblityRole="link"to any element that navigates between screens - every element using these utilities that would do internal routing in a web context will get the "link" role in Android and iOS. - All interactive inline text: The react-native-accessibility-engine project has a test "link-role-required" that requires any
Textelement with anonPresshandler to have the role "link", regardless of what the press does. This appears to be interpreting "link" by presentation (interactive inline text) rather than the nature of the action. - Opening URLs in device browser: App accessibility consultants I've worked with in the past have advised that "link" should be used specifically for interactive elements that cause the app open and focus a web browser, and that "button" should be used for in-app navigation (regardless of element type). Here's an example of an accessibility consultancy giving this advice in the context of iOS:
Links open a URL in an external browser. This the important distinction between buttons. Only apply the trait of link when the users interaction with the control will take them out of your application and into Safari.
How can we address it?
There is one right answer as to how React Native's link accessibilityRole is intended to be used, based on the appropriate iOS and Android guidance for the underlying properties and traits that React Native applies internally to the native Android and iOS elements it controls.
The React Native accessibility docs should state it clearly. For example (assuming this one is correct):
link Interactive elements that load a web page in a device browser, switching focus away from this app
Why is it important?
There's clearly already diverging interpretations of how this role should be used, and it's a very commonly used role, so there is almost certainly already a lot of inconsistency on when elements are described as a "Link" in React Native apps in production.
Who needs this?
Ideally all React Native developers should be applying this accessibilityRole consistently and correctly.
When should this happen (use version numbers if needed)?
As soon as there's a clear consensus on what the correct usage is.
- 主要言語
- MDX
- スター
- 2.2k
- フォーク
- 6.3k
- 平均マージ
- 11時間 37分
- マージ済み PR(30日)
- 19
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react/react-native-website のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
react/react-native-website#5217 ·
-
Integration with Existing Apps: Podfile example does not use `use_react_native!`, is incomplete オープン👋 Good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
react/react-native-website#2958 · コメント 2 件 ·
-
:ghost: Missing Docs 👋 Good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
react/react-native-website#889 · コメント 5 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
react/react-native-website#5216 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
react/react-native-website#5154 · コメント 6 件 ·
react/react-native-website の issue をすべて見る
似ている issue
-
📕documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
db-ux-design-system/core-web#8239 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
unoplatform/uno#24629 ·
-
area:ui bug platform:vscode platform:windows
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96521 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100