MatDatepicker - WCAG 1.4.11 Issue
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung


### 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
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, das datepicker-Problem anhand der aufgeführten Tastaturschritte zu reproduzieren, und prüfen Sie das beigefügte Dokument zu WCAG 1.4.11 sowie die Screenshots. Identifizieren Sie die Formatierung für den sekundären Fokuszustand des Datums und überprüfen Sie anschließend, dass sein Kontrast zu den angrenzenden Farben mindestens 3:1 erreicht und dass das Verhalten des datepicker weiterhin korrekt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- accessibility, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100