Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug] Header fullscreen/close controls lack accessible names and use hardcoded icon fills

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

维护者通常 1 天内回复

@PARTH-TUSSLE 已经在做这个了。

开始于 2026年10月18日。

  • #1881 来自 @PARTH-TUSSLE —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

kind/bug
Current Behavior

In src/custom/Modal/index.tsx, the modal header actions are not properly accessible:

  1. The enter/exit fullscreen controls are the styled FullScreenIcon / FullScreenExitIcon SVG components with an onClick. They appear to be plain SVGs rather than buttons, so they have no role and no accessible name, and they are probably not keyboard-focusable. Please verify with a keyboard and a screen reader. The surrounding CustomTooltip only helps on hover.
  2. The close control is an IconButton (CloseBtn) with no aria-label, so a screen reader announces only "button".
  3. CloseBtn hardcodes fill: #fff (and CloseIcon passes fill="#fff") instead of using the theme/token or inheriting currentColor. The fullscreen icons already use theme.palette.common.white, so the header is inconsistent.

This conflicts with the existing guidance in DESIGN.md ("Semantic ARIA: icon-only buttons must supply descriptive aria-label and Tooltip").

Expected Behavior
  • Fullscreen toggle: a native, keyboard-operable button (for example MUI IconButton) with aria-label "Enter fullscreen" / "Exit fullscreen", keeping the existing tooltip and data-testids (modal-enter-fullscreen-btn, modal-exit-fullscreen-btn).
  • Close control: aria-label="Close dialog" (keep data-testid="modal-close-btn").
  • Icon colors come from the existing theme token or inherit via currentColor (the header's color) rather than a hardcoded literal.
  • Keep this focused on the header controls: no layout or styling redesign.
Acceptance Criteria
  • getByRole('button', { name: 'Enter fullscreen' }), { name: 'Exit fullscreen' } and { name: 'Close dialog' } resolve in tests.
  • Both controls can be focused and activated with Tab, Enter and Space.
  • No hardcoded color literals remain in the header controls.
  • Existing Modal tests and data-testids keep passing.
  • Does not change Modal / useModal public props.
Context
  • Raised in review by @leecalcote on #1868, and deliberately left out of that PR to keep it scoped to #1864.
Screenshots/Logs
Environment

Contributor Guides and Resources
主要语言
TypeScript
星标
140
派生
244
平均合并
2 天 18 小时
30 天内合并 PR
18

环境准备

从这里开始

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

layer5io/sistent 的其他 Issue

查看 layer5io/sistent 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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