Skip to content

Commit

Permalink
fix(a11y): Add aria-label to DocFindBar input field (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsuarez-globant authored Apr 7, 2021
1 parent fc9c662 commit e1ce28b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/i18n/en-US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ find_next=Find next
find_previous=Find previous
# Button tooltip for closing the find bar
find_close=Close
# Search input Aria-label attribute
find_label=Search input

# Error messages
# Default preview error message
Expand Down
1 change: 1 addition & 0 deletions src/lib/viewers/doc/DocFindBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class DocFindBar extends EventEmitter {
// Find input field
this.findFieldEl = document.createElement('input');
this.findFieldEl.classList.add('bp-doc-find-field');
this.findFieldEl.setAttribute('aria-label', __('find_label'));
this.findBarEl.appendChild(this.findFieldEl);

// Match Results Count
Expand Down

0 comments on commit e1ce28b

Please sign in to comment.