|
15 | 15 | </div> |
16 | 16 |
|
17 | 17 | <div #toolbar class="core-rte-toolbar" [class.toolbar-hidden]="toolbarHidden"> |
18 | | - <button *ngIf="toolbarArrows" class="toolbar-arrow" [class.toolbar-arrow-hidden]="toolbarPrevHidden" (click)="toolbarPrev($event)" |
| 18 | + <button *ngIf="toolbarArrows" class="toolbar-arrow" [attr.disabled]="toolbarPrevHidden ? 'true' : null" (click)="toolbarPrev($event)" |
19 | 19 | (keyup)="toolbarPrev($event)" (mousedown)="downAction($event)" (keydown)="downAction($event)" |
20 | | - [attr.aria-label]="'core.previous' | translate"> |
| 20 | + [attr.aria-label]="'core.previous' | translate" [tabindex]="toolbarPrevHidden ? -1 : 0"> |
21 | 21 | <ion-icon name="fas-chevron-left" aria-hidden="true"></ion-icon> |
22 | 22 | </button> |
23 | 23 | <ion-slides [options]="slidesOpts" [dir]="direction" (ionSlideDidChange)="updateToolbarArrows()"> |
24 | 24 | <!-- https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand --> |
25 | 25 | <ion-slide> |
26 | 26 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.strong" [title]="'core.editor.bold' | translate" |
27 | 27 | (click)="buttonAction($event, 'bold', 'strong')" (keyup)="buttonAction($event, 'bold', 'strong')" |
28 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 28 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
29 | 29 | <ion-icon name="fas-bold" aria-hidden="true"></ion-icon> |
30 | 30 | </button> |
31 | 31 | </ion-slide> |
32 | 32 | <ion-slide> |
33 | 33 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.em" [title]="'core.editor.italic' | translate" |
34 | 34 | (click)="buttonAction($event, 'italic', 'em')" (keyup)="buttonAction($event, 'italic', 'em')" |
35 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 35 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
36 | 36 | <ion-icon name="fas-italic" aria-hidden="true"></ion-icon> |
37 | 37 | </button> |
38 | 38 | </ion-slide> |
39 | 39 | <ion-slide> |
40 | 40 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.u" [title]="'core.editor.underline' | translate" |
41 | 41 | (click)="buttonAction($event, 'underline', 'u')" (keyup)="buttonAction($event, 'underline', 'u')" |
42 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 42 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
43 | 43 | <ion-icon name="fas-underline" aria-hidden="true"></ion-icon> |
44 | 44 | </button> |
45 | 45 | </ion-slide> |
46 | 46 | <ion-slide> |
47 | 47 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.strike" [title]="'core.editor.strike' | translate" |
48 | 48 | (click)="buttonAction($event, 'strikethrough', 'strike')" (keyup)="buttonAction($event, 'strikethrough', 'strike')" |
49 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 49 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
50 | 50 | <ion-icon name="fas-strikethrough" aria-hidden="true"></ion-icon> |
51 | 51 | </button> |
52 | 52 | </ion-slide> |
53 | 53 | <ion-slide> |
54 | 54 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.p" [title]="'core.editor.p' | translate" |
55 | 55 | (click)="buttonAction($event, 'p', 'block')" (keyup)="buttonAction($event, 'p', 'block')" (mousedown)="downAction($event)" |
56 | | - (keydown)="downAction($event)"> |
| 56 | + (keydown)="downAction($event)" tabindex="0"> |
57 | 57 | <ion-icon name="fas-paragraph" aria-hidden="true"></ion-icon> |
58 | 58 | </button> |
59 | 59 | </ion-slide> |
60 | 60 | <ion-slide> |
61 | 61 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.h3" [title]="'core.editor.h3' | translate" |
62 | 62 | (click)="buttonAction($event, 'h3', 'block')" (keyup)="buttonAction($event, 'h3', 'block')" (mousedown)="downAction($event)" |
63 | | - (keydown)="downAction($event)"> |
| 63 | + (keydown)="downAction($event)" tabindex="0"> |
64 | 64 | <ion-icon name="fas-heading" aria-hidden="true"></ion-icon><span aria-hidden="true">3</span> |
65 | 65 | </button> |
66 | 66 | </ion-slide> |
67 | 67 | <ion-slide> |
68 | 68 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.h4" [title]="'core.editor.h4' | translate" |
69 | 69 | (click)="buttonAction($event, 'h4', 'block')" (keyup)="buttonAction($event, 'h4', 'block')" (mousedown)="downAction($event)" |
70 | | - (keydown)="downAction($event)"> |
| 70 | + (keydown)="downAction($event)" tabindex="0"> |
71 | 71 | <ion-icon name="fas-heading" aria-hidden="true"></ion-icon><span aria-hidden="true">4</span> |
72 | 72 | </button> |
73 | 73 | </ion-slide> |
74 | 74 | <ion-slide> |
75 | 75 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.h5" [title]="'core.editor.h5' | translate" |
76 | 76 | (click)="buttonAction($event, 'h5', 'block')" (keyup)="buttonAction($event, 'h5', 'block')" (mousedown)="downAction($event)" |
77 | | - (keydown)="downAction($event)"> |
| 77 | + (keydown)="downAction($event)" tabindex="0"> |
78 | 78 | <ion-icon name="fas-heading" aria-hidden="true"></ion-icon><span aria-hidden="true">5</span> |
79 | 79 | </button> |
80 | 80 | </ion-slide> |
81 | 81 | <ion-slide> |
82 | 82 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.ul" [title]="'core.editor.unorderedlist' | translate" |
83 | | - (click)="buttonAction($event, 'insertUnorderedList')" (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 83 | + (click)="buttonAction($event, 'insertUnorderedList')" (mousedown)="downAction($event)" (keydown)="downAction($event)" |
| 84 | + tabindex="0"> |
84 | 85 | <ion-icon name="fas-list-ul" aria-hidden="true"></ion-icon> |
85 | 86 | </button> |
86 | 87 | </ion-slide> |
87 | 88 | <ion-slide> |
88 | 89 | <button [disabled]="!rteEnabled" [attr.aria-pressed]="toolbarStyles.ol" [title]="'core.editor.orderedlist' | translate" |
89 | 90 | (click)="buttonAction($event, 'insertOrderedList')" (keyup)="buttonAction($event, 'insertOrderedList')" |
90 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 91 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
91 | 92 | <ion-icon name="fas-list-ol" aria-hidden="true"></ion-icon> |
92 | 93 | </button> |
93 | 94 | </ion-slide> |
|
105 | 106 | </ion-slide> |
106 | 107 | <ion-slide> |
107 | 108 | <button [attr.aria-pressed]="!rteEnabled" [title]="'core.editor.toggle' | translate" (click)="toggleEditor($event)" |
108 | | - (keyup)="toggleEditor($event)" (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 109 | + (keyup)="toggleEditor($event)" (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
109 | 110 | <ion-icon name="fas-code" aria-hidden="true"></ion-icon> |
110 | 111 | </button> |
111 | 112 | </ion-slide> |
112 | 113 | <ion-slide *ngIf="isPhone"> |
113 | 114 | <button [title]="'core.editor.hidetoolbar' | translate" (click)="hideToolbar($event, true)" (keyup)="hideToolbar($event, true)" |
114 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 115 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" tabindex="0"> |
115 | 116 | <ion-icon name="fas-times" aria-hidden="true"></ion-icon> |
116 | 117 | </button> |
117 | 118 | </ion-slide> |
118 | 119 | </ion-slides> |
119 | | - <button *ngIf="toolbarArrows" class="toolbar-arrow" [class.toolbar-arrow-hidden]="toolbarNextHidden" |
| 120 | + <button *ngIf="toolbarArrows" class="toolbar-arrow" [attr.disabled]="toolbarNextHidden ? 'true' : null" |
120 | 121 | [attr.aria-label]="'core.next' | translate" (click)="toolbarNext($event)" (keyup)="toolbarNext($event)" |
121 | | - (mousedown)="downAction($event)" (keydown)="downAction($event)"> |
| 122 | + (mousedown)="downAction($event)" (keydown)="downAction($event)" [tabindex]="toolbarNextHidden ? -1 : 0"> |
122 | 123 | <ion-icon name="fas-chevron-right" aria-hidden="true"></ion-icon> |
123 | 124 | </button> |
124 | 125 | </div> |
0 commit comments