File tree 2 files changed +5
-0
lines changed
packages/autocomplete-js/src
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ See: https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocom
89
89
class="aa-InputWrapperPrefix"
90
90
>
91
91
<label
92
+ arialabel="Submit"
92
93
class="aa-Label"
93
94
for="autocomplete-input"
94
95
id="autocomplete-label"
Original file line number Diff line number Diff line change @@ -78,9 +78,13 @@ export function createAutocompleteDom<TItem extends BaseItem>({
78
78
title : translations . submitButtonTitle ,
79
79
children : [ SearchIcon ( { environment } ) ] ,
80
80
} ) ;
81
+ // @MAJOR Remove the label wrapper for the submit button.
82
+ // The submit button is sufficient for accessibility purposes, and
83
+ // wrapping it with the label actually makes it less accessible (see CR-6077).
81
84
const label = createDomElement ( 'label' , {
82
85
class : classNames . label ,
83
86
children : [ submitButton ] ,
87
+ ariaLabel : translations . submitButtonTitle ,
84
88
...labelProps ,
85
89
} ) ;
86
90
const clearButton = createDomElement ( 'button' , {
You can’t perform that action at this time.
0 commit comments