Skip to content

Commit bedfb78

Browse files
committed
accessibility
1 parent 5fc51fb commit bedfb78

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/lib/paginator/paginator.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<div class="mat-paginator-page-length-select">
22
{{_intl.itemsPerPageLabel}}
3-
<md-select [ngModel]="pageLength" (change)="_changePageLength($event.value)">
3+
<md-select [ngModel]="pageLength"
4+
[attr.aria-label]="_intl.itemsPerPageLabel"
5+
(change)="_changePageLength($event.value)">
46
<md-option *ngFor="let pageLengthOption of pageLengthOptions" [value]="pageLengthOption">
57
{{pageLengthOption}}
68
</md-option>
@@ -14,6 +16,7 @@
1416
<button md-icon-button
1517
class="mat-paginator-increment-button"
1618
(click)="incrementPage(-1)"
19+
[attr.aria-label]="_intl.decrementLabel"
1720
[mdTooltip]="_intl.decrementLabel"
1821
[mdTooltipPosition]="'above'"
1922
[disabled]="!_canIncrementPage(-1)">
@@ -22,6 +25,7 @@
2225
<button md-icon-button
2326
class="mat-paginator-increment-button"
2427
(click)="incrementPage(1)"
28+
[attr.aria-label]="_intl.incrementLabel"
2529
[mdTooltip]="_intl.incrementLabel"
2630
[mdTooltipPosition]="'above'"
2731
[disabled]="!_canIncrementPage(1)">

src/lib/paginator/paginator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
ViewEncapsulation
88
} from '@angular/core';
99
import {MdPaginatorIntl} from './paginator-intl';
10+
import {MATERIAL_COMPATIBILITY_MODE} from '../core';
1011

1112
/**
1213
* Change event object that is emitted when the user selects a
@@ -26,6 +27,9 @@ export class PageChangeEvent {
2627
host: {
2728
'class': 'mat-paginator',
2829
},
30+
providers: [
31+
{provide: MATERIAL_COMPATIBILITY_MODE, useValue: false}
32+
],
2933
changeDetection: ChangeDetectionStrategy.OnPush,
3034
encapsulation: ViewEncapsulation.None,
3135
})

0 commit comments

Comments
 (0)