Skip to content

Commit cdbac60

Browse files
authored
feat: added aria-label for screen readers on search bar input
1 parent 495dfe0 commit cdbac60

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- aria-label to search-bar input
13+
1014
## [3.176.4] - 2025-03-11
1115

1216
### Added
1317

1418
- Youtube shorts as a valid format
15-
-
19+
1620
## [3.176.3] - 2025-02-28
1721

1822
### Added

messages/context.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"store/search.placeholder": "search.placeholder",
33
"store/search.searchFor": "search.searchFor",
44
"store/search.search-term-too-short": "search.search-term-too-short",
5+
"store/search.autocompleteInput.aria-label": "store/search.autocompleteInput.aria-label",
56
"admin/editor.productName.title": "admin/editor.productName.title",
67
"admin/editor.productName.description": "admin/editor.productName.description",
78
"admin/editor.productName.showBrandName.title": "admin/editor.productName.showBrandName.title",

messages/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"store/search.placeholder": "Search",
55
"store/search.searchFor": "Search for {term}",
66
"store/search.search-term-too-short": "Search term is too short",
7+
"store/search.autocompleteInput.aria-label": "Search for products",
78
"admin/editor.productName.title": "Product Name",
89
"admin/editor.productName.description": "Product name component",
910
"admin/editor.productName.showBrandName.title": "Show brand name",

react/components/SearchBar/AutocompleteInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ function AutocompleteInput({
250250
error={Boolean(inputErrorMessage)}
251251
errorMessage={inputErrorMessage}
252252
onSubmit={onGoToSearchPage}
253+
aria-label={intl.formatMessage({ id: 'store/search.autocompleteInput.aria-label' })}
253254
/>
254255
</div>
255256
</form>
@@ -268,6 +269,7 @@ function AutocompleteInput({
268269
{...restProps}
269270
error={Boolean(inputErrorMessage)}
270271
errorMessage={inputErrorMessage}
272+
aria-label={intl.formatMessage({ id: 'store/search.autocompleteInput.aria-label' })}
271273
/>
272274
</div>
273275
</div>

0 commit comments

Comments
 (0)