angular / angular/components

bug(material): activated nav-list-item font color is not readable in dark mode

未关闭
#27,696 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Accessibility area: theming P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

I have an App that uses a sidenav with a nav-list inside. I want the activated nav-list-item to be noticeable, so I'm using that state, but the default behavior with a dark theme, results in an unreadable font color.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-3qaoos
Steps to reproduce:
1. Open it.
2. See how the first nav list item is activated and barely readable.

### Expected Behavior

The background and font color have a minimum contrast, so the item is readable.

### Actual Behavior

The background and font color do not have a minimum contrast, so the item is not readable.

### Environment

- Angular: 16.1.0
- CDK/Material: 16.1.5
- Browser(s): Chrome 116.0.5845.97 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11 (10.0.22621.2134)

贡献指南

打开贡献指南

调研方向

打开链接的 StackBlitz 复现,并检查启用深色主题时 Angular Material sidenav/nav-list 的行为。验证已激活项的前景色和背景色,然后确认完成的更改在复现的场景中满足所述的最低对比度要求。

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

评估

技术栈
angular, typescript
领域
accessibility, design, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

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