Skip to content

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 28, 2020

Adds an invisible close button for screen reader users that becomes visible when the user tabs into it.

Note: there was a PR did was doing this already (#14429), but the feedback on it was never addressed and there hasn't been any activity on it in nearly 2 years.

Fixes #14379.

Angular_Material_-_Google_Chrome_2020-09-28_13-28-41

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Sep 28, 2020
@crisbeto crisbeto requested a review from mmalerba as a code owner September 28, 2020 10:40
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 28, 2020
type="button"
mat-raised-button
color="primary"
class="mat-datepicker-close-button"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this just be .cdk-visually-hidden instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mat-datepicker-close-button class is used to position the button under the calendar. It's toggling cdk-visually-hidden above to show/hide the button.

Adds an invisible close button for screen reader users that becomes visible when the user tabs into it.

Fixes angular#14379.
@crisbeto crisbeto force-pushed the 14379/datepicker-close-button branch from 6afce18 to f726766 Compare October 1, 2020 12:55
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Oct 5, 2020
@crisbeto crisbeto added 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 Oct 7, 2020
@wagnermaciel wagnermaciel merged commit 407398f into angular:master Oct 7, 2020
@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 Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add (invisible) close button to datepicker overlay
4 participants