File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,8 @@ export default {
129129 "OF_LAST_PAGES" : "of {{last}} pages" ,
130130 "OF_LAST_PAGE" : "of {{last}} page" ,
131131 "NEXT" : "Next" ,
132- "PREVIOUS" : "Previous"
132+ "PREVIOUS" : "Previous" ,
133+ "SELECT_ARIA" : "Select page number"
133134 } ,
134135 "TABLE" : {
135136 "GO_TO_PAGE" : "Go to page" ,
Original file line number Diff line number Diff line change 44 Output ,
55 EventEmitter
66} from "@angular/core" ;
7+ import { I18n } from "carbon-components-angular/i18n" ;
8+
79/**
810 * Used to present a selection of pages when there is an overflow
911 * in the pagination list
@@ -18,7 +20,9 @@ import {
1820 <li class="bx--pagination-nav__list-item" *ngIf="count > 1">
1921 <div class="bx--pagination-nav__select">
2022 <select
21- class="bx--pagination-nav__page bx--pagination-nav__page--select" (change)="handleChange($event)">
23+ [attr.aria-label]="ariaLabel"
24+ class="bx--pagination-nav__page bx--pagination-nav__page--select"
25+ (change)="handleChange($event)">
2226 <option value="" hidden></option>
2327 <option
2428 *ngFor="let item of countAsArray; let i = index">
@@ -46,6 +50,8 @@ export class PaginationOverflow {
4650
4751 @Input ( ) count : number ;
4852
53+ @Input ( ) ariaLabel : string = this . i18n . get ( ) . PAGINATION . SELECT_ARIA ;
54+
4955 /**
5056 * Emits click event
5157 */
@@ -55,7 +61,7 @@ export class PaginationOverflow {
5561 return [ ...Array ( this . count ) ] ;
5662 }
5763
58- constructor ( ) { }
64+ constructor ( protected i18n : I18n ) { }
5965
6066 handleChange ( event ) {
6167 this . change . emit ( + event . target . value ) ;
You can’t perform that action at this time.
0 commit comments