diff --git a/packages/web-components/src/components/masthead/masthead-search.ts b/packages/web-components/src/components/masthead/masthead-search.ts index 87bf9536ca9..d53c2f53002 100644 --- a/packages/web-components/src/components/masthead/masthead-search.ts +++ b/packages/web-components/src/components/masthead/masthead-search.ts @@ -1,7 +1,7 @@ /** * @license * - * Copyright IBM Corp. 2020 + * Copyright IBM Corp. 2020, 2021 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. @@ -245,6 +245,7 @@ class DDSMastheadSearch extends BXDropdown { language, open, redirectUrl, + searchLabel, _handleClickInner: handleClickInner, _handleKeydownInner: handleKeydownInner, _handleKeypressInner: handleKeypressInner, @@ -269,6 +270,7 @@ class DDSMastheadSearch extends BXDropdown { aria-haspopup="listbox" aria-owns="result-list" aria-expanded="${Boolean(open)}" + aria-label="${ifNonNull(searchLabel)}" @click=${handleClickInner} @keydown="${handleKeydownInner}" @keypress="${handleKeypressInner}" diff --git a/packages/web-components/tests/snapshots/dds-masthead-search.md b/packages/web-components/tests/snapshots/dds-masthead-search.md index 9526a623e25..8a464c4ca6f 100644 --- a/packages/web-components/tests/snapshots/dds-masthead-search.md +++ b/packages/web-components/tests/snapshots/dds-masthead-search.md @@ -71,6 +71,7 @@