Skip to content

Commit cf327ae

Browse files
authored
fix: blog header search a11y (#209)
1 parent f125f61 commit cf327ae

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/components/Search/Search.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ export const Search = ({
7878
};
7979

8080
return (
81-
<button className={b('input-icon')} onClick={handleClick}>
81+
<button
82+
className={b('input-icon')}
83+
onClick={handleClick}
84+
aria-label={i18n(Keyset.SearchAction)}
85+
>
8286
<Icon size={iconSize} data={iconData} />
8387
</button>
8488
);

src/i18n/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export enum Keyset {
2323
PromptSignInOnLike = 'prompt_sign_in_on_like',
2424
SignIn = 'Sign In',
2525
Save = 'save',
26+
SearchAction = 'search_action',
2627
}
2728

2829
const en = {
@@ -50,6 +51,7 @@ const en = {
5051
],
5152
[Keyset.SignIn]: 'Sign In',
5253
[Keyset.Save]: 'Save',
54+
[Keyset.SearchAction]: 'Find',
5355
};
5456

5557
const ru = {
@@ -78,6 +80,7 @@ const ru = {
7880
],
7981
[Keyset.SignIn]: 'Войти',
8082
[Keyset.Save]: 'Сохранить',
83+
[Keyset.SearchAction]: 'Найти',
8184
};
8285

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

0 commit comments

Comments
 (0)