Skip to content

Commit

Permalink
fix: blog header search a11y (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
PahaN47 authored Aug 30, 2024
1 parent f125f61 commit cf327ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ export const Search = ({
};

return (
<button className={b('input-icon')} onClick={handleClick}>
<button
className={b('input-icon')}
onClick={handleClick}
aria-label={i18n(Keyset.SearchAction)}
>
<Icon size={iconSize} data={iconData} />
</button>
);
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum Keyset {
PromptSignInOnLike = 'prompt_sign_in_on_like',
SignIn = 'Sign In',
Save = 'save',
SearchAction = 'search_action',
}

const en = {
Expand Down Expand Up @@ -50,6 +51,7 @@ const en = {
],
[Keyset.SignIn]: 'Sign In',
[Keyset.Save]: 'Save',
[Keyset.SearchAction]: 'Find',
};

const ru = {
Expand Down Expand Up @@ -78,6 +80,7 @@ const ru = {
],
[Keyset.SignIn]: 'Войти',
[Keyset.Save]: 'Сохранить',
[Keyset.SearchAction]: 'Найти',
};

export const i18n = addComponentKeysets({en, ru}, NAMESPACE);

0 comments on commit cf327ae

Please sign in to comment.