|
41 | 41 | {{_intl.getRangeLabel(pageIndex, pageSize, length)}} |
42 | 42 | </div> |
43 | 43 |
|
| 44 | + <!-- |
| 45 | + The buttons use `disabledInteractive` so that they can retain focus if they become disabled, |
| 46 | + otherwise focus is moved to the document body. However, users should not be able to navigate |
| 47 | + into these buttons, so `tabindex` is set to -1 when disabled. |
| 48 | + --> |
| 49 | + |
44 | 50 | @if (showFirstLastButtons) { |
45 | 51 | <button matIconButton type="button" |
46 | 52 | class="mat-mdc-paginator-navigation-first" |
|
50 | 56 | [matTooltipDisabled]="_previousButtonsDisabled()" |
51 | 57 | matTooltipPosition="above" |
52 | 58 | [disabled]="_previousButtonsDisabled()" |
| 59 | + [tabindex]="_previousButtonsDisabled() ? -1 : null" |
53 | 60 | disabledInteractive> |
54 | 61 | <svg class="mat-mdc-paginator-icon" |
55 | 62 | viewBox="0 0 24 24" |
|
67 | 74 | [matTooltipDisabled]="_previousButtonsDisabled()" |
68 | 75 | matTooltipPosition="above" |
69 | 76 | [disabled]="_previousButtonsDisabled()" |
| 77 | + [tabindex]="_previousButtonsDisabled() ? -1 : null" |
70 | 78 | disabledInteractive> |
71 | 79 | <svg class="mat-mdc-paginator-icon" |
72 | 80 | viewBox="0 0 24 24" |
|
83 | 91 | [matTooltipDisabled]="_nextButtonsDisabled()" |
84 | 92 | matTooltipPosition="above" |
85 | 93 | [disabled]="_nextButtonsDisabled()" |
| 94 | + [tabindex]="_nextButtonsDisabled() ? -1 : null" |
86 | 95 | disabledInteractive> |
87 | 96 | <svg class="mat-mdc-paginator-icon" |
88 | 97 | viewBox="0 0 24 24" |
|
100 | 109 | [matTooltipDisabled]="_nextButtonsDisabled()" |
101 | 110 | matTooltipPosition="above" |
102 | 111 | [disabled]="_nextButtonsDisabled()" |
| 112 | + [tabindex]="_nextButtonsDisabled() ? -1 : null" |
103 | 113 | disabledInteractive> |
104 | 114 | <svg class="mat-mdc-paginator-icon" |
105 | 115 | viewBox="0 0 24 24" |
|
0 commit comments