From 74e9c5f258027b42a1eb19e657405b8eabcb97bd Mon Sep 17 00:00:00 2001 From: fsuarez Date: Wed, 7 Apr 2021 15:58:35 -0500 Subject: [PATCH 1/3] fix: add aria-label to docfindbar input field --- src/lib/viewers/doc/DocFindBar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/viewers/doc/DocFindBar.js b/src/lib/viewers/doc/DocFindBar.js index b982f804f..9bb42ec50 100644 --- a/src/lib/viewers/doc/DocFindBar.js +++ b/src/lib/viewers/doc/DocFindBar.js @@ -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', 'Search input'); this.findBarEl.appendChild(this.findFieldEl); // Match Results Count From f40856c67e8cd7e7750b6cefdd7d5a066b83d8cc Mon Sep 17 00:00:00 2001 From: fsuarez Date: Wed, 7 Apr 2021 16:20:22 -0500 Subject: [PATCH 2/3] fix: add string in internationalization file --- src/i18n/en-US.properties | 2 ++ src/lib/viewers/doc/DocFindBar.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/en-US.properties b/src/i18n/en-US.properties index 4e46b5f90..3f0e28a99 100644 --- a/src/i18n/en-US.properties +++ b/src/i18n/en-US.properties @@ -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 +search_input=Search input # Error messages # Default preview error message diff --git a/src/lib/viewers/doc/DocFindBar.js b/src/lib/viewers/doc/DocFindBar.js index 9bb42ec50..767dc0a43 100644 --- a/src/lib/viewers/doc/DocFindBar.js +++ b/src/lib/viewers/doc/DocFindBar.js @@ -82,7 +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', 'Search input'); + this.findFieldEl.setAttribute('aria-label', __('search_input')); this.findBarEl.appendChild(this.findFieldEl); // Match Results Count From ae8f911220a2a4210f716e074a2b4a7a930b4ecb Mon Sep 17 00:00:00 2001 From: fsuarez Date: Wed, 7 Apr 2021 16:27:16 -0500 Subject: [PATCH 3/3] fix: change internationalization key --- src/i18n/en-US.properties | 2 +- src/lib/viewers/doc/DocFindBar.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/en-US.properties b/src/i18n/en-US.properties index 3f0e28a99..d2493c78c 100644 --- a/src/i18n/en-US.properties +++ b/src/i18n/en-US.properties @@ -55,7 +55,7 @@ find_previous=Find previous # Button tooltip for closing the find bar find_close=Close # Search input Aria-label attribute -search_input=Search input +find_label=Search input # Error messages # Default preview error message diff --git a/src/lib/viewers/doc/DocFindBar.js b/src/lib/viewers/doc/DocFindBar.js index 767dc0a43..e9bc3b426 100644 --- a/src/lib/viewers/doc/DocFindBar.js +++ b/src/lib/viewers/doc/DocFindBar.js @@ -82,7 +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', __('search_input')); + this.findFieldEl.setAttribute('aria-label', __('find_label')); this.findBarEl.appendChild(this.findFieldEl); // Match Results Count