material-components / material-components/material-components-android

Material 3 Date Picker with Disabled Dates: Disabled Dates are Focusable with External Keyboard

Open
#4,169 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Issue: Accessibility Widget: DatePicker
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

**Description:** Disabled dates in the M3 Date Picker component are focusable via external keyboard navigation, however there is no visible focus indicator. Disabled controls should not receive keyboard focus.

Note: This is an accessibility failure of WCAG 2.4.7 Focus Visible (and raises concerns with WCAG 2.1.1 Keyboard as well).

**Expected behavior:** Disabled controls are not focusable via external keyboard navigation. When using keys on a month with disabled dates, focus should skip over the disabled dates.

Note: Expected Behavior would match Material Compose Date Picker behavior

**Steps to Reproduce:**

1. Connect a physical external keyboard to an Android mobile device
2. Open a default Material 3 Date Picker component that contains disabled dates
4. Using the keys on the keyboard, navigate to a disabled date
5. Confirm disabled dates can be focused, but focus is “lost” since there is no visible focus indicator for the disabled dates

Note on attachments:
1. Recording of issue from Material 3 Date Picker
2. Bug report from Samsung Galaxy S20 (also reproducible on Google Pixel devices)

https://github.com/material-components/material-components-android/assets/126836844/73388230-4789-419c-aa85-735644e2b9b1

[bugreport-x1quex-TP1A.220624.014-2024-05-01-16-12-22.zip](https://github.com/material-components/material-components-android/files/15280302/bugreport-x1quex-TP1A.220624.014-2024-05-01-16-12-22.zip)

**Android API version:** All

**Material Library version:** 1.11.0 (at least)

**Device:** Samsung Galaxy S20 and all Google Pixel

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Material 3 Date Picker focus and keyboard-navigation implementation, then reproduce the issue on a device with an external keyboard using disabled dates. Done means arrow-key navigation skips disabled dates so they cannot receive focus, matching the stated Material Compose behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
accessibility, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.