patternfly / patternfly/patternfly-react

Drawer - automatically manage focus when drawer is opened/closed

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

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

A11y Breaking change :boom: PF Team
Ngôn ngữ chính
TypeScript
Star
862
Fork
392
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
9

Mô tả

Follow up for core issue https://github.com/patternfly/patternfly/issues/5319
A more consistent solution than was used to fix https://github.com/patternfly/patternfly-react/issues/8394

move the close button to the top of the drawer body rather than the end.

The modal component automatically places focus on the first interactable element in the modal when it is opened.
In the case of the Drawer, that should be the close button by default.
If the close button is not provided, then it should be the first interactable element in the drawer.
If there are no interactable elements, focus should be placed on the drawer body.

Like the modal, this should happen automatically for the drawer, unless overridden by the consumer.

When the drawer is closed, focus should be returned to the drawer toggle - or at least, the props needed for the consumer to implement this focus management should be exposed. All related examples/demos should be updated to use this behavior (including the wizard with drawer)


Jira Issue: PF-145

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 so sánh hành vi focus của Drawer với hành vi Modal hiện có và xem lại các ví dụ về Drawer, bao gồm wizard với drawer. Triển khai hành vi focus khi mở và đóng như đã nêu, có hỗ trợ consumer override, sau đó cập nhật tất cả các ví dụ và bản demo liên quan. Công việc được xem là hoàn tất khi focus đi tới nút đóng, phần tử có thể tương tác đầu tiên hoặc phần thân drawer tùy trường hợp, và quay lại drawer toggle khi drawer đóng.

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, typescript
Lĩnh vực
accessibility, frontend
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.