-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
feat(a11y): add option to change tabindex of month cells #1074
Conversation
This reverts commit 4bf4a7c.
BREAKING CHANGE: date-fns v2 or higher is now required as a peer dependency If implementing a custom adapter, the `max` function signature has changed to accept an array of dates, instead of an infinite argument list. The date adapters no longer accept strings as input arguments. Closes mattlewis92#1064
BREAKING CHANGE: the dist files are no longer annotated for usage with closure compiler.
BREAKING CHANGE: The day and week view have now merged. For most users this should be a seamless migration, however there are some edge cases that you may need to take account for: Any custom styles you used for the day view will need to be adjusted. The `cal-day-view-theme` sass mixin is now gone as all the styles are shared between the week and day view. The `eventWidth` option is removed, events now fill the available width. If using `[daysInWeek]="1"` on the week view, the date and title formatters for the day view will be used instead. The week view now has a border top applied to the top of the component container, rather than the top of the day headers container. The `getDayView` and `getDayViewHourGrid` functions have been removed from the `CalendarUtils` service. The following interfaces from `calendar-utils` were renamed: `DayViewHourSegment` -> `WeekViewHourSegment`, `DayViewHour` -> `WeekViewHour`, `DayViewEvent` -> `WeekViewTimeEvent` The day view scheduler demo is now based off the week view instead, please check the updated demo code for how to migrate: https://mattlewis92.github.io/angular-calendar/#/day-view-scheduler Closes mattlewis92#889
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes mattlewis92#962
BREAKING CHANGE: if using a custom `headerTemplate` on the week view, then you must now add `let-dragEnter="dragEnter"` to the templates variables and `(dragEnter)="dragEnter.emit({ date: day.date })"` onto the `mwlDroppable` element. Closes mattlewis92#1062
Merge from base repo
Merge Base 0.28 into Fork
This fails a massive amount of tests for some reason. @mattlewis92 should this PR be closed and have the change be made directly to the main 0.28 branch to be included in PR #1070? |
Yeah, please base it off |
@mattlewis92 just to confirm, |
yes please! 😄 |
ca0a0f8
to
d0aaa83
Compare
Closing as it's now part of #1070 (I rebased it to merge all the a11y stuff into one commit) |
Discovered that we needed this option in our own application.
First a little background info on screen readers. Some screen readers (NVDA in particular) will begin to list off everything inside of a div/span if it has a tabindex, but no aria-label.
Currently, the tab index is always set on the
mwl-calendar-month-cell
component. In the default template this is fine, because the screen reader reads everything inside of the cell and there happens to be just one thing inside of the cell, an aria-label. Everything else in the cell is aria-hidden.This becomes a problem when you have custom cell templates and want to have multiple things inside of them. A screen reader will get stopped at the tabindex of
mwl-calendar-month-cell
and may proceed to read off everything inside of the cell before you've tabbed to them.This change allows you to turn off the tabindex of
mwl-calendar-month-cell
so you can manipulate your month cell more fully.