[Bug]: Missing form accessibility attributes, semantic labels, and deprecated event handlers in React views

未关闭
#1,441 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Siddh2024 已经在做这个了。

开始于 2026年11月18日。

  • #1442 来自 @Siddh2024 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript, react

调研方向

The issue names ChatInput.js, LoginForm.js, TwoFactorTotpModal.js, InsertLinkToolBox, and MessageReportWindow in the React views. Start by inspecting the listed form inputs and their existing tests, then check the Storybook views with an accessibility audit. Done means each input has the requested identifying and accessible label attributes, LoginForm uses semantic label associations, and its key handler is updated; the issue author says a fix is already prepared, so confirm the work is available before starting.

由索引模型根据 Issue 内容生成。

描述

bug
Description:

Several input fields across the @embeddedchat/react views lack proper accessibility attributes (id, name, aria-label), semantic <label htmlFor="..."> associations, and use deprecated event handlers:

  • ChatInput (ChatInput.js): The file input (<input type="file" ...>) lacks id, name, and an accessible label (aria-label), triggering accessibility violations in browser audits.
  • LoginForm (LoginForm.js): Field labels are rendered as plain <div> tags rather than semantic <label htmlFor="..."> elements, preventing screen readers from associating labels with input fields. It also relies on the deprecated onKeyPress event handler.
  • TwoFactorTotpModal (TwoFactorTotpModal.js): TOTP input field lacks name, id, autoComplete="one-time-code", and accessible labeling.
  • InsertLinkToolBox & MessageReportWindow: Inputs lack id, name, and descriptive aria-label attributes.
Steps to reproduce:
  1. Clone the repository and install dependencies with yarn.
  2. Start Storybook: cd packages/react && yarn storybook.
  3. Open http://localhost:6006 in Chrome / Chromium.
  4. Open Chrome DevTools (F12) and inspect the Issues tab.
Expected behavior:

All interactive form inputs should comply with WCAG 2.1 AA standards:

  • Each input should have a unique id, name, and accessible label (aria-label or <label htmlFor="...">).
  • Input event handlers should use modern standards (onKeyDown instead of deprecated onKeyPress).
Actual behavior:

Browser and accessibility audits flag the form fields with:
A form field element has neither an id nor a name attribute. This might stop the browser from correctly autofilling the form.

Screenshot 2026-11-18 215642

I have tracked down these inputs across the views and prepared a fully tested fix with 0 lint errors. Could you please assign this issue to me so I can raise a PR?

主要语言
JavaScript
星标
171
派生
421
平均合并
3 天 6 小时
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RocketChat/EmbeddedChat 的其他 Issue

查看 RocketChat/EmbeddedChat 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。