[Bug]: Missing alt text on images, keyboard-inaccessible image attachments, and missing Escape key handling in ImageGallery
Maintainer thường phản hồi trong vòng 1 ngà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
- 40/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ệ
- javascript, react
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Start in packages/react/src/views/AttachmentHandler/ImageAttachment.js (trigger around lines 97-113, <img> at 98 and 162), then packages/react/src/views/AttachmentPreview/PreviewType/image.js:9 and packages/react/src/views/ImageGallery/ImageGallery.js (slide at 107, close button 47-53). Reproduce in Storybook first: Tab should skip the attachment, Escape should not close the gallery. Done means alt fallbacks on every <img>, a role="button"/tabIndex/onKeyDown trigger, an aria-label on the exit button, and Escape closing the modal. Note pull request #1464 is already open against this, so it is effectively claimed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description:
Image attachments and the full-screen ImageGallery modal in @embeddedchat/react contain several accessibility and keyboard navigation compliance issues:
-
Missing
altAttributes on<img>Tags (WCAG 1.1.1 Non-text Content - Level A):- In
packages/react/src/views/AttachmentHandler/ImageAttachment.js(lines 98 and 162),<img src={...} />elements lack analtattribute. - In
packages/react/src/views/AttachmentPreview/PreviewType/image.js(line 9), the upload preview image lacks analtattribute. - In
packages/react/src/views/ImageGallery/ImageGallery.js(line 107), full-screen gallery slides lack analtattribute.
Withoutalttext, screen readers announce raw URLs to blind users or ignore the images completely.
- In
-
Keyboard-Inaccessible Image Preview (WCAG 2.1.1 Keyboard Navigation):
- In
ImageAttachment.js(lines 97 and 113), the container that opens the image gallery is rendered as a plain<div>(<Box onClick={() => setShowGallery(true)}>). - It lacks
role="button",tabIndex="0", an accessible label, and keyboard listeners (Enter/Space). Keyboard-only users cannot tab to or open full-size image attachments.
- In
-
Missing
aria-labelandEscapeKey Listener inImageGallery(WCAG 4.1.2 & WCAG 2.1.2):- In
ImageGallery.js(lines 47-53), the close button (<ActionButton css={styles.exit} onClick={() => setShowGallery(false)}><Icon name="cross" /></ActionButton>) lacks anaria-label="Close image gallery". Screen readers announce it as a bare "Button". - When the gallery modal is open full-screen, pressing the
Escapekey does not dismiss the modal.
- In
Steps to reproduce:
- Open EmbeddedChat in Storybook or live chat.
- View an image attachment in chat history.
- Inspect the DOM in browser DevTools: observe that the
<img>tag has noaltattribute. - Try navigating to the image attachment using only the keyboard (
Tab): observe that focus completely skips the image, making it impossible to open the gallery via keyboard. - Click the image with a mouse to open the
ImageGallerymodal. - Press the
Escapekey: observe that the modal does not close. - Inspect the exit button: observe that it lacks an
aria-label.
Expected behavior:
- All
<img>tags should have descriptive or fallbackaltattributes (e.g.attachment.title || attachment.description || 'Image attachment'). - Clickable image attachment containers should have
role="button",tabIndex="0", a descriptivearia-label="View full image", and open onEnter/Spacekey presses. - The
ImageGalleryexit button should have anaria-label="Close image gallery". - Pressing
EscapeinImageGalleryshould close the modal and return focus to the triggering element.
Proposed Solution:
I would like to resolve this in @embeddedchat/react:
- Add proper
altattributes to images inImageAttachment.js,PreviewType/image.js, andImageGallery.js. - Make the image attachment trigger an accessible button (
role="button",tabIndex={0}, andonKeyDownhandling forEnterandSpace). - Add an
aria-labelto the exit button and anEscapekey event listener inImageGallery.js.
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
- Đọ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 RocketChat/EmbeddedChat
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migrationCó thể đã có người làm @MuhammadFaizan-prog đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RocketChat/EmbeddedChat#1489 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)Có thể đã có người làm @yashsarvaiya45 đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
RocketChat/EmbeddedChat#1486 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticatedCó thể đã có người làm @ashwanisingh011 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RocketChat/EmbeddedChat#1484 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContextCó thể đã có người làm @swarnendusahu10-dotcom đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
RocketChat/EmbeddedChat#1482 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed outCó thể đã có người làm @swarnendusahu10-dotcom đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
RocketChat/EmbeddedChat#1480 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của RocketChat/EmbeddedChat
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Life-Framework/Life-Framework#7017 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
e/DevOps enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Accenture/sfmc-devtools#2795 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent/guide documentation help wanted stage/010-actionable
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
kubestellar/console-kb#4003 · 1 bình luận ·
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 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FilOzone/synapse-sdk#1201 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày