From 6c00e2c6c07ac633185b803d1009b6ac3407071b Mon Sep 17 00:00:00 2001 From: Hemantha Kumar Paladugu Date: Mon, 20 Dec 2021 16:45:49 +0530 Subject: [PATCH] Accessibilty Issues- Generic feature/RMA-91480. --- .../src/lib/dxc-button/dxc-button.component.html | 2 +- .../src/lib/dxc-page-errors/dxc-page-errors.component.ts | 3 ++- .../src/lib/dxc-paginator/dxc-paginator.component.html | 5 +++++ .../src/lib/dxc-paginator/dxc-paginator.component.ts | 7 ++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/projects/dxc-ngx-cdk/src/lib/dxc-button/dxc-button.component.html b/projects/dxc-ngx-cdk/src/lib/dxc-button/dxc-button.component.html index 80844b226..f557de64d 100644 --- a/projects/dxc-ngx-cdk/src/lib/dxc-button/dxc-button.component.html +++ b/projects/dxc-ngx-cdk/src/lib/dxc-button/dxc-button.component.html @@ -10,7 +10,7 @@ attr.aria-labelledby="{{ariaLabelledBy}}" attr.aria-describedby="{{ariaDescribedBy}}" > - diff --git a/projects/dxc-ngx-cdk/src/lib/dxc-page-errors/dxc-page-errors.component.ts b/projects/dxc-ngx-cdk/src/lib/dxc-page-errors/dxc-page-errors.component.ts index df9471e33..9166f3f9b 100644 --- a/projects/dxc-ngx-cdk/src/lib/dxc-page-errors/dxc-page-errors.component.ts +++ b/projects/dxc-ngx-cdk/src/lib/dxc-page-errors/dxc-page-errors.component.ts @@ -5,7 +5,8 @@ import { AbstractControlDirective, AbstractControl } from '@angular/forms'; selector: 'dxc-show-errors', template: ` `, }) diff --git a/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.html b/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.html index 82b777e08..ece5bcfbe 100644 --- a/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.html +++ b/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.html @@ -30,6 +30,7 @@ [iconSrc]="firstImgSrc" [disabled]="currentPageInternal === 1" [tabIndexValue]="tabIndexValue" + ariaLabel="{{globalResource.tltfirstPage?.description}}" > Page: {{ currentPageInternal }} of {{ totalPages }} @@ -67,6 +70,7 @@ [iconSrc]="nextImgSrc" [disabled]="currentPageInternal === totalPages" [tabIndexValue]="tabIndexValue" + ariaLabel="{{globalResource.tltnextPage?.description}}" > diff --git a/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.ts b/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.ts index 72d84bc2b..4378fb629 100644 --- a/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.ts +++ b/projects/dxc-ngx-cdk/src/lib/dxc-paginator/dxc-paginator.component.ts @@ -10,6 +10,7 @@ import { import { BehaviorSubject } from "rxjs"; import { coerceNumberProperty, coerceArray } from "@angular/cdk/coercion"; import { css } from "emotion"; +import { ConfigurationsetupService } from './../services/startup/configurationsetup.service'; @Component({ selector: "dxc-paginator", @@ -17,6 +18,7 @@ import { css } from "emotion"; styleUrls: ["./dxc-paginator.component.scss"], }) export class DxcPaginatorComponent implements OnInit { + globalResource: { [key: string]: { description: string, type: string } }; @Input() get currentPage(): number { return this._currentPage; @@ -100,13 +102,16 @@ export class DxcPaginatorComponent implements OnInit { tabIndexValue: 0 }); - constructor() { + constructor( + public config: ConfigurationsetupService, + ) { this.currentPage = 1; this.itemsPerPage = 5; this.totalItems = 1; } ngOnInit() { + this.globalResource = this.config.configservice.Resources; this.calculateInternalValues(this.defaultInputs.getValue()); this.setButtonVisibility(this.paginationActions); this.className = `${this.getDynamicStyle()}`;