feat: cover keyboard navigation inside menus in the accessibility skill

オープン 初心者向け
#219 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, flutter

調査の方向性

キーボード操作とメニューに関するアクセシビリティスキルの内容を見つけ、MenuAnchorとウィジェットテストがどのように説明されているかを確認します。要望されたフォーカス動作、TabとShift+Tabによる移動、開いたときのフォーカスと両端から抜ける動作を網羅するテスト例を追加します。スキルに3つの動作すべてが記載され、issueのCIとカバレッジの要件を満たせば完了です。

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

説明

feature
Description

The accessibility skill covers the basics of keyboard access well: controls must be reachable with Tab, dismissable with Escape, and announced correctly to screen readers. One case it doesn't cover yet is moving through a menu with the keyboard.

When a MenuAnchor opens from Enter, focus stays on the button that opened it. Arrow keys move into the menu, but Tab skips the menu and moves to the next control on the page. A keyboard user who expects Tab to walk through the menu's entries, as it does on many websites, lands somewhere else and the menu stays open behind them.

The suggestion is to add this case to the skill, so menus built with MenuAnchor move focus into the menu when it opens and let Tab and Shift+Tab move between its entries.

Related: #218 covers a different keyboard gap in the same skill (Enter on the web for custom buttons).

Requirements
  • The accessibility skill says that opening a menu with the keyboard moves focus to its first entry.
  • The skill says Tab and Shift+Tab move between the menu's entries, and that going past the first or last entry closes the menu and puts focus back on its button or on the next control.
  • The skill shows how to test this in a widget test: focus on open, Tab and Shift+Tab between entries, and leaving the menu at either end.
  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.
Additional Context

One way to build it: give each MenuItemButton a FocusNode, request focus on the first one in MenuAnchor.onOpen (after the next frame, once the entries exist), and wrap each entry in Actions that handle NextFocusIntent and PreviousFocusIntent to move to the next or previous entry, closing the menu past either end.

主要言語
Shell
スター
180
フォーク
25
平均マージ
1日 7時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

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

VeryGoodOpenSource/vgv-ai-flutter-plugin のほかの issue

VeryGoodOpenSource/vgv-ai-flutter-plugin の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

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

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