[Bug]: Missing focus-visible indicators on Button and missing focus trap in Modal

Đang mở
#1,450 0 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

@Siddh2024 đang làm issue này rồi.

Từ ngày 22/11/2026.

  • #1452 của @Siddh2024 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, react
Lĩnh vực
accessibility, frontend

Hướng nghiên cứu

Start in packages/ui-elements/src/components/Button/Button.styles.js, where outline: none is set without a :focus-visible replacement, then look at packages/ui-elements/src/components/Modal/Modal.js for the missing focus trap. Reproduce with cd packages/react && npx storybook dev -p 6006 and tab through the JOIN button and the Login modal to confirm both behaviours before changing anything. Done means every button shows a visible keyboard focus ring and Tab/Shift+Tab stay inside an open modal. Note that an open pull request (#1452) already targets this, so check it before starting.

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

Mô tả

bug
Description:

Keyboard navigation across @embeddedchat/ui-elements exhibits two major accessibility compliance issues:

  1. Missing :focus-visible on Button (WCAG 2.4.7 Level AA):
    In packages/ui-elements/src/components/Button/Button.styles.js, outline: none; is set globally without providing an alternate :focus-visible indicator. This causes buttons (such as JOIN, action buttons, modal close, and dialog action buttons) to have invisible focus when navigating via keyboard.

  2. Missing Modal Focus Trap (WCAG 2.1.2 Level A):
    When Modal is opened, keyboard focus escapes the modal container and tabs through background elements behind the modal before cycling back.

Steps to reproduce:
  1. Open Storybook: cd packages/react && npx storybook dev -p 6006
  2. Open http://localhost:6006/iframe.html?id=embeddedchat-simple--simple&viewMode=story
  3. Press Tab — notice no visual focus ring appears on the JOIN button (despite receiving DOM focus).
  4. Press Enter to open the Login modal.
  5. Tab past the form elements — notice focus escapes the modal and navigates through invisible background elements.
Expected behavior:
  • All interactive buttons should have a distinct, visible :focus-visible outline for keyboard users.
  • Modal should trap keyboard focus within the dialog while open.
Proposed Solution:

I would like to resolve this in @embeddedchat/ui-elements:

  • Add accessible :focus-visible styles in Button.styles.js.
  • Implement focus trapping in Modal.js so Tab / Shift+Tab cycles only through elements within the open modal dialog.

May I be assigned this issue?

Ngôn ngữ chính
JavaScript
Star
171
Fork
421
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có 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.

Issue khác của RocketChat/EmbeddedChat

Tất cả issue của RocketChat/EmbeddedChat

Issue tương tự

Thêm issue về JavaScript

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.