Skip to content

Commit

Permalink
fix - Header Search Accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andreituicu committed Mar 21, 2024
1 parent 2eaa95e commit 703445c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aemeds/blocks/blogheader/blogheader.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,16 @@ export default async function decorate(block) {
}, 350);
};

const placeholders = await placeholdersPromise;

const searchLi = li({ class: 'blogsearch-menu-container' },
div({ class: 'blogsearch' }, form({},
div({ class: 'search-container' },
i({ class: 'search-icon' }),
span({ class: 'search-indicator' }),
input({
type: 'text',
'aria-label': placeholders.search || 'Search',
oninput: () => { debouncedSearch(); },
onkeyup: (e) => { if (e.code === 'Escape') { delayedBlur(); } },
onblur: () => { delayedBlur(); },
Expand All @@ -215,7 +218,6 @@ export default async function decorate(block) {
navSections.appendChild(searchLi);
navSections.setAttribute('aria-expanded', 'false');

const placeholders = await placeholdersPromise;

Check failure on line 221 in aemeds/blocks/blogheader/blogheader.js

View workflow job for this annotation

GitHub Actions / build

More than 1 blank line not allowed
const menuText = placeholders.mobileMenu || 'Menu';
blogHeader.prepend(
Expand Down

0 comments on commit 703445c

Please sign in to comment.