feat: cover keyboard navigation inside menus in the accessibility skill

Đang mở Phù hợp với người mới
#219 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart, flutter

Hướng nghiên cứu

Tìm nội dung của skill về khả năng truy cập liên quan đến thao tác bằng bàn phím và menu, sau đó kiểm tra cách nội dung đó mô tả MenuAnchor và các bài kiểm thử widget. Bổ sung hành vi focus được yêu cầu, thao tác điều hướng bằng Tab và Shift+Tab, cùng ví dụ kiểm thử bao quát focus khi mở và việc rời khỏi ở cả hai đầu. Công việc hoàn tất khi skill ghi lại cả ba hành vi và các yêu cầu CI cùng độ bao phủ của issue được đáp ứng.

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

Mô tả

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.

Ngôn ngữ chính
Shell
Star
180
Fork
25
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
17

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 VeryGoodOpenSource/vgv-ai-flutter-plugin

Tất cả issue của VeryGoodOpenSource/vgv-ai-flutter-plugin

Issue tương tự

Thêm issue về Shell/Bash

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.