Skip to content

Commit

Permalink
Adding input for 508 screen reader support
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyholt committed Apr 29, 2019
1 parent cd4a41f commit 808f5af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/app/mat-select-search/mat-select-search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(input)="onInputChange($event.target.value)"
(blur)="onBlur($event.target.value)"
[placeholder]="placeholderLabel"
aria-label="dropdown search"
[attr.aria-label]="ariaLabel"
/>
<mat-spinner *ngIf="searching"
[@enterAnimation]
Expand Down
3 changes: 3 additions & 0 deletions src/app/mat-select-search/mat-select-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ export class MatSelectSearchComponent implements OnInit, OnDestroy, AfterViewIni
/** 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';

/** Reference to the search input field */
@ViewChild('searchSelectInput', {read: ElementRef}) searchSelectInput: ElementRef;

Expand Down

0 comments on commit 808f5af

Please sign in to comment.