angular / angular/components

MatDatepicker - WCAG 1.4.11 Issue

オープン
#25,378 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
Accessibility area: material/datepicker P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

![Primary Date Color-Pass](https://user-images.githubusercontent.com/104395491/190719954-e0a3f751-032b-4c9d-938b-fd37830fb218.jpg)
![Secondary Date Color-Fail](https://user-images.githubusercontent.com/104395491/190719964-db17ab64-b7b5-45a5-a87a-c5ae99941d23.jpg)
### 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

Present in all versions

### Description

The color of the _**secondary date**_ focus state indicator does not meet WCAG 1.4.11 requirements. It's currently at 1.6:1 and it needs to be 3:1 minimum.

https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html

Success Criterion [1.4.11 Non-text Contrast](https://www.w3.org/TR/WCAG21/#non-text-contrast) (Level AA): The visual [presentation](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-presentation) of the following have a [contrast ratio](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-contrast-ratio) of at least 3:1 against adjacent color(s):

**User Interface Components**
Visual information required to identify [user interface components](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-user-interface-component) and [states](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-state), except for inactive components or where the appearance of the component is determined by the user agent and not modified by the author;

**_Graphical Objects_**
Parts of graphics required to understand the content, except when a particular presentation of graphics is [essential](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#dfn-essential) to the information being conveyed

[WCAG 1.4.11 - Mat Datepicker.docx](https://github.com/angular/components/files/9243949/WCAG.1.4.11.-.Mat.Datepicker.docx)

### Reproduction

Steps to reproduce:
1. Open the datepicker component
2. Tab into the individual dates
3. Select to pick an active date
4. Go back into datepicker and use arrow keys to move to between non-selected dates

### Expected Behavior

Color contrast should be 3:1 or higher

### Actual Behavior

Color contrast for the secondary date when in focus is 1.6:1

### Environment

- Angular: 12.2
- CDK/Material: 12.2
- Browser(s): Edge and Chrome
- Microsoft Edge - Version 103.0.1264.71 (Official build) (64-bit)
- Chrome - Version 103.0.5060.134 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Enterprise

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、記載されたキーボード操作の手順でdatepickerの問題を再現し、添付されたWCAG 1.4.11のドキュメントとスクリーンショットを確認します。日付の二次フォーカス状態のスタイルを特定し、その隣接する色とのコントラストが少なくとも3:1に達していること、そしてdatepickerの動作が引き続き正しいことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
accessibility, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。