Skip to content

Commit b027cf5

Browse files
authored
fix: Search box button accessibility (#6619)
* fix: Search button accessibility * chore: Search button font * refactor: absolute positioning removed
1 parent ae1e8a7 commit b027cf5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

components/Common/Search/index.module.css

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
.searchButton {
2-
@apply relative
2+
@apply flex
33
w-52
4+
gap-2
45
rounded-md
56
bg-neutral-200
6-
py-2
7-
pl-9
8-
pr-4
9-
text-left
7+
p-2
108
text-sm
11-
text-neutral-700
9+
text-neutral-800
1210
hover:bg-neutral-300
1311
hover:text-neutral-900
1412
dark:bg-neutral-900
@@ -18,18 +16,19 @@
1816
}
1917

2018
.magnifyingGlassIcon {
21-
@apply absolute
22-
left-2
23-
top-[8px]
24-
size-5;
19+
@apply size-5;
2520
}
2621

2722
.shortcutIndicator {
2823
@apply invisible
29-
absolute
30-
right-2
31-
ml-2
24+
flex
25+
flex-1
26+
items-center
27+
justify-end
28+
self-center
29+
px-1
3230
font-ibm-plex-mono
31+
text-xs
3332
motion-safe:transition-opacity
3433
motion-safe:duration-100
3534
md:visible;

components/Common/Search/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const SearchButton: FC = () => {
4040
type="button"
4141
onClick={openSearchBox}
4242
className={styles.searchButton}
43+
aria-label={t('components.search.searchBox.placeholder')}
4344
>
4445
<MagnifyingGlassIcon className={styles.magnifyingGlassIcon} />
4546

0 commit comments

Comments
 (0)