Skip to content

fix(material/datepicker): update active date on focusing a cell #24384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

zarend
Copy link
Contributor

@zarend zarend commented Feb 9, 2022

When a a date cell on the calendar recieves focus, set the active date
to that cell. This ensures that the active date matches the date with
browser focus.

Previously, we set the active date on keydown and click, but that was
problematic for screenreaders. That's because many screenreaders trigger
a focus event instead of a keydown event when using screenreader
specific navigation (VoiceOver, Chromevox, NVDA).

Note that this is the second attempt at this. First attempt was #24279,
which was reverted in #24380 due to an internal issue.

Fixes #23483

When a a date cell on the calendar recieves focus, set the active date
to that cell. This ensures that the active date matches the date with
browser focus.

Previously, we set the active date on keydown and click, but that was
problematic for screenreaders. That's because many screenreaders trigger
a focus event instead of a keydown event when using screenreader
specific navigation (VoiceOver, Chromevox, NVDA).

Note that this is the second attempt at this. First attempt was angular#24279,
which was reverted in angular#24380 due to an internal issue.

Fixes angular#23483
@zarend zarend requested review from mmalerba and a team as code owners February 9, 2022 00:37
@zarend zarend added Accessibility This issue is related to accessibility (a11y) area: material/datepicker target: patch This PR is targeted for the next patch release labels Feb 9, 2022
@zarend zarend added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Feb 9, 2022
@zarend
Copy link
Contributor Author

zarend commented Feb 9, 2022

caretaker note: this PR was previously reverted in #24380 due to causing and internal issue.

@zarend zarend added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Feb 9, 2022
@zarend zarend merged commit 15774a9 into angular:master Feb 14, 2022
@zarend zarend deleted the listen-for-focus-event-on-calendar-cells-take-2 branch February 15, 2022 05:04
zarend added a commit to zarend/components that referenced this pull request Feb 15, 2022
Fixes a failing unit test, which was referencing Jan 1, 2017 as the initial
date when it is actually Jan 3, 2017. This happened as a result of a bad
merge where angular#24384 changed the initial date to Jan 3, and angular#24401 added a
new test that assume the initial date was Jan 1.
zarend added a commit to zarend/components that referenced this pull request Feb 15, 2022
Fixes a failing unit test, which was referencing Jan 1, 2017 as the initial
date when it is actually Jan 3, 2017. This happened as a result of a bad
merge where angular#24384 changed the initial date to Jan 3, and angular#24401 added a
new test that assume the initial date was Jan 1.
zarend added a commit to zarend/components that referenced this pull request Feb 15, 2022
Fix a failing unit test, which was referencing Jan 1, 2017 as the initial
date when it is actually Jan 3, 2017. This happened as a result of a bad
merge where angular#24384 changed the initial date to Jan 3, and angular#24401 added a
new test that assume the initial date was Jan 1.

Fixes CI failure
zarend added a commit that referenced this pull request Feb 15, 2022
…4418)

Fix a failing unit test, which was referencing Jan 1, 2017 as the initial
date when it is actually Jan 3, 2017. This happened as a result of a bad
merge where #24384 changed the initial date to Jan 3, and #24401 added a
new test that assume the initial date was Jan 1.

Fixes CI failure
amysorto pushed a commit to amysorto/components that referenced this pull request Feb 15, 2022
…lar#24384)

When a a date cell on the calendar recieves focus, set the active date
to that cell. This ensures that the active date matches the date with
browser focus.

Previously, we set the active date on keydown and click, but that was
problematic for screenreaders. That's because many screenreaders trigger
a focus event instead of a keydown event when using screenreader
specific navigation (VoiceOver, Chromevox, NVDA).

Note that this is the second attempt at this. First attempt was angular#24279,
which was reverted in angular#24380 due to an internal issue.

Fixes angular#23483
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker area: material/datepicker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(datepicker): navigating with ChromeVox keyboard shortcuts does not update selected date
2 participants