Skip to content

Commit bff59a0

Browse files
committed
MOBILE-4065 calendar: Fix calendar days focus
1 parent 7fac689 commit bff59a0

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/addons/calendar/components/calendar/addon-calendar-calendar.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2 id="addon-calendar-monthname">
3333
</ion-grid>
3434

3535
<core-swipe-slides [manager]="manager">
36-
<ng-template let-month="item">
36+
<ng-template let-month="item" let-activeView="active">
3737
<!-- Calendar view. -->
3838
<ion-grid class="addon-calendar-months" role="table" aria-describedby="addon-calendar-monthname">
3939
<div role="rowgroup">
@@ -57,9 +57,9 @@ <h2 id="addon-calendar-monthname">
5757
"today": month.isCurrentMonth && day.istoday,
5858
"weekend": day.isweekend,
5959
"duration_finish": day.haslastdayofevent
60-
}' [class.addon-calendar-event-past-day]="month.isPastMonth || day.ispast" role="cell" tabindex="0"
61-
(ariaButtonClick)="dayClicked(day.mday)">
62-
<p class="addon-calendar-day-number" role="button">
60+
}' [class.addon-calendar-event-past-day]="month.isPastMonth || day.ispast" role="cell"
61+
(ariaButtonClick)="dayClicked(day.mday)" [tabindex]="activeView ? 0 : -1">
62+
<p class="addon-calendar-day-number">
6363
<span aria-hidden="true">{{ day.mday }}</span>
6464
<span class="sr-only">{{ day.periodName | translate }}</span>
6565
</p>
@@ -72,8 +72,8 @@ <h2 id="addon-calendar-monthname">
7272
<div class="ion-hide-md-down addon-calendar-day-events" *ngIf="day.filteredEvents">
7373
<ng-container *ngFor="let event of day.filteredEvents | slice:0:4; let index = index">
7474
<div *ngIf="index < 3 || day.filteredEvents.length == 4" class="addon-calendar-event"
75-
[class.addon-calendar-event-past]="event.ispast" role="button" tabindex="0"
76-
(ariaButtonClick)="eventClicked(event, $event)">
75+
[class.addon-calendar-event-past]="event.ispast" (ariaButtonClick)="eventClicked(event, $event)"
76+
[tabindex]="activeView ? 0 : -1">
7777
<span class="calendar_event_type calendar_event_{{event.formattedType}}"></span>
7878
<ion-icon *ngIf="event.offline && !event.deleted" name="fas-clock"
7979
[attr.aria-label]="'core.notsent' | translate"></ion-icon>

src/addons/calendar/components/calendar/calendar.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
@include border-end(1px, solid var(--addon-calendar-border-color));
2626
overflow: hidden;
2727
min-height: 60px;
28-
cursor: pointer;
2928

3029
&:first-child {
3130
@include padding-horizontal(10px, null);

src/core/components/swipe-slides/swipe-slides.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<ion-slides *ngIf="loaded" (ionSlideWillChange)="slideWillChange()" (ionSlideDidChange)="slideDidChange()" [options]="options">
2-
<ion-slide *ngFor="let item of items; index as index">
2+
<ion-slide *ngFor="let item of items; index as index" [attr.aria-hidden]="!isActive(index)">
33
<ng-container *ngIf="template" [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{item: item, active: isActive(index)}">
44
</ng-container>
55
</ion-slide>

src/theme/theme.base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ ion-item.item {
15811581
outline: none;
15821582
}
15831583

1584-
textarea, button, select, input, a {
1584+
textarea, button, select, input, a, .clickable {
15851585
&:focus {
15861586
@include core-focus-style();
15871587
outline: none;

0 commit comments

Comments
 (0)