From 808f5af0bf32e2872a2b01c3e759900e5ce6330a Mon Sep 17 00:00:00 2001 From: tonyholt Date: Mon, 29 Apr 2019 07:38:06 -0400 Subject: [PATCH] Adding input for 508 screen reader support --- README.md | 3 +++ src/app/mat-select-search/mat-select-search.component.html | 2 +- src/app/mat-select-search/mat-select-search.component.ts | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a63a6a8..31b8959 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,9 @@ Furthermore, it provides the following inputs: /** Disables scrolling to active options when option list changes. Useful for server-side search */ @Input() disableScrollToActiveOnOptionsChanged = false; + + /** Adds 508 screen reader support for search box */ + @Input() ariaLabel = 'dropdown search'; ``` #### Customize clear icon diff --git a/src/app/mat-select-search/mat-select-search.component.html b/src/app/mat-select-search/mat-select-search.component.html index 7a859d6..04a1804 100755 --- a/src/app/mat-select-search/mat-select-search.component.html +++ b/src/app/mat-select-search/mat-select-search.component.html @@ -15,7 +15,7 @@ (input)="onInputChange($event.target.value)" (blur)="onBlur($event.target.value)" [placeholder]="placeholderLabel" - aria-label="dropdown search" + [attr.aria-label]="ariaLabel" />