Fix accessibility issues found by the Storybook catalog

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
57/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, storybook, typescript

调研方向

Start with ui/host/src/catalog/accessibility.ts to see the exceptions, then inspect shell.tsx, the dashboard and settings pages, dashboards/viz/health-pieces.tsx, rail.tsx, dashboards/panel-card.tsx, and settings.tsx. Run just design-check after removing an exception, or open the affected story with just design and check its Accessibility panel. Done when each listed issue is fixed and its exception is deleted.

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

描述

bug

The Storybook catalog runs axe on every story with a11y.test: "error". To keep it green, these existing issues in the shipping markup are excepted in ui/host/src/catalog/accessibility.ts. Fix each one, then delete its exception.

  • Nested and duplicate <main> landmarks. AppShell.Main in shell.tsx and the dashboard and settings pages each render a <main>. axe reports landmark-main-is-top-level (one nested main), landmark-no-duplicate-main (two mains) and landmark-unique (two unnamed mains).
  • Degraded health label contrast, light scheme. The degraded Metric label in dashboards/viz/health-pieces.tsx inherits warn text #c87d21, which is 3.275:1 on white (color-contrast, needs 4.5:1). Mantine's c prop overrides the component's darker status ink.
  • Selected chat timestamp contrast, light scheme. In rail.tsx, the dimmed timestamp on the active chat row is 3.901:1 against the selected background (color-contrast).
  • Panel loader label. The labelled Mantine Loader in dashboards/panel-card.tsx (aria-label="Loading panel") renders a span with no role (aria-prohibited-attr). Give it role="status" or use visually hidden text.
  • Settings documentation link. The "Sending telemetry" link in settings.tsx inherits the text colour and underlines only on hover. That is 1.289:1 against the surrounding text (link-in-text-block). Underline it at rest, or give it link colour.

Reproduce: run just design-check after removing an exception, or open the story in just design and check the Accessibility panel.

主要语言
Go
星标
11
派生
0
平均合并
7 小时 38 分钟
30 天内合并 PR
98

环境准备

从这里开始

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

labstack/fanout 的其他 Issue

查看 labstack/fanout 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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