-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(datepicker): make date range aria-live and fix active date logic #11144
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
Conversation
Which screen-readers did you try this in? |
Only on ChromeVox. Now that you mentioned it I tried VoiceOver and it doesn't seem to respect the |
Try using the |
Blocked on some other PRs I'm doing to enhance |
marking this as |
@jelbourn switched to |
@@ -1,9 +1,11 @@ | |||
<div class="mat-calendar-header"> | |||
<div class="mat-calendar-controls"> | |||
<button mat-button type="button" class="mat-calendar-period-button" | |||
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel"> | |||
(click)="currentPeriodClicked()" [attr.aria-label]="periodButtonLabel" | |||
cdkAriaLive="polite"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this now, but we should make cdkAriaLive
default to polite
in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #11618 so we don't forget
@@ -101,6 +101,9 @@ export class MatMultiYearView<D> implements AfterContentInit { | |||
/** Emits the selected year. This doesn't imply a change on the selected date */ | |||
@Output() readonly yearSelected: EventEmitter<D> = new EventEmitter<D>(); | |||
|
|||
/** Emits when any date is activated. */ | |||
@Output() readonly activeDateChange: EventEmitter<D> = new EventEmitter<D>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add unit test for these new outputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the tests to work the same way as month-view tests, which test the @Output()
@jelbourn PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
fixes #11128
fixes #11129
fixes #11132