Skip to content

Commit

Permalink
Fix #50968 - Don't update the settings count aria-label unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Jun 9, 2018
1 parent a715378 commit 539e5c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ export class SearchWidget extends Widget {
}

public showMessage(message: string, count: number): void {
if (this.countElement) {
// Avoid setting the aria-label unnecessarily, the screenreader will read the count every time it's set. #50968
if (this.countElement && message !== this.countElement.textContent) {
this.countElement.textContent = message;
this.inputBox.inputElement.setAttribute('aria-label', message);
DOM.toggleClass(this.countElement, 'no-results', count === 0);
Expand Down

0 comments on commit 539e5c9

Please sign in to comment.