The editor's expanded platform preview doesn't work with the keyboard
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
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Đọc src/components/editor/PlatformPreviewStrip.tsx, tập trung vào các thẻ nền tảng, lớp phủ, hộp thoại, tên nền tảng và nút Close. Triển khai các hành vi được liệt kê về focus, Escape, giới hạn Tab trong hộp thoại, khôi phục focus và gắn nhãn cho hộp thoại, đồng thời giữ nguyên hành vi đóng khi nhấp vào nền. Dùng các tiêu chí chấp nhận về bàn phím của issue để xác minh kết quả, sau đó chạy npm run check, npm run test và npm run build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In the editor (for example https://og.codercops.com/create/blog), Tab to one of the platform cards under the canvas and press Enter. The expanded preview opens, but:
- Focus stays on the card behind the overlay.
- Escape doesn't close it. The Escape handler is on the overlay (
src/components/editor/PlatformPreviewStrip.tsx, line 73), and the overlay doesn't have focus. - Tab keeps moving through the other seven cards underneath. After them it lands on the overlay itself, which is a
role="button"(lines 69 to 72) whose name is all the text in the preview. Only there does Escape work. - When it closes (Escape on the overlay, or the Close button), focus drops to the page body instead of going back to the card.
- The dialog (line 78) has no
aria-modaland no accessible name, so a screen reader doesn't say which platform it shows.
What to do
- Move focus into the dialog when it opens, for example to the Close button.
- Close it on Escape while it's open: listen for
keydownondocumentin auseEffectand remove the listener in the cleanup, or put the handler on the dialog. - Keep Tab inside the dialog while it's open (the viewport buttons and Close), so focus can't wander behind it.
- When it closes, put focus back on the card that opened it.
- Give the dialog
aria-modal="true"andaria-labelledbypointing at the platform name (line 82).useIdworks for the id. - Remove
role="button"andtabIndexfrom the overlay. Clicking the backdrop can still close it.
Where to look
src/components/editor/PlatformPreviewStrip.tsx: the cards (lines 41 to 54), the overlay (lines 68 to 74), the dialog (lines 75 to 80), the platform name (lines 82 to 84) and the Close button (lines 87 to 94)
Acceptance criteria
- Enter on a platform card opens the preview with focus inside it
- Escape and the Close button both close it, and focus goes back to the card
- Tab stays inside the dialog while it's open
- The dialog has
aria-modal="true"and is labelled with the platform name - Mouse use works as before, including closing by clicking the backdrop
-
npm run check,npm run testandnpm run buildpass - The PR says how you tested it with the keyboard
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #170 in the description.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 4
- Merge trung bình
- 8 giờ 14 phút
- Pull request đã merge (30 ngày)
- 120
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/ogcops
-
Add the Updated Post blog template (`blog-updated-post`)Có thể đã có người làm @sank8-2 đã nhận hôm nay. Đang mởgood first issue hacktoberfest templates
codercops/ogcops#289 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the Interview Q&A quote template (`quote-interview`)Có thể đã có người làm @piyusshhjangid đã nhận hôm nay. Đang mởgood first issue hacktoberfest templates
codercops/ogcops#285 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the Security Advisory GitHub template (`github-security-advisory`)Có thể đã có người làm @srujankaleru2007 đã nhận hôm nay. Đang mởgood first issue hacktoberfest templates
codercops/ogcops#279 · 7 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the Live Recording podcast template (`podcast-live-recording`)Có thể đã có người làm @Ravindar-Amogh-Gummadavelly đã nhận 1 ngày trước. Đang mởgood first issue hacktoberfest templates
codercops/ogcops#261 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Hacktoberfest 2026: start hereĐang mởhacktoberfest
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/ogcops
Issue tương tự
-
New icon: `filter-clear`Đang mởcalcite-ui-icons enhancement impact - p3 - not time sensitive needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Esri/calcite-design-system#15467 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
diegosouzapw/OmniRoute#18390 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
guilhermerodz/input-otp#157 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
davidjerleke/embla-carousel#1414 ·
Maintainer thường phản hồi trong vòng 4 ngày