diff --git a/src/Selector/Input.tsx b/src/Selector/Input.tsx index d006dc71..5cda09e7 100644 --- a/src/Selector/Input.tsx +++ b/src/Selector/Input.tsx @@ -90,6 +90,7 @@ const Input: React.RefForwardingComponent = ( className: classNames(`${prefixCls}-selection-search-input`, inputNode?.props?.className), role: 'combobox', + 'aria-label': 'Search', 'aria-expanded': open, 'aria-haspopup': 'listbox', 'aria-owns': `${id}_list`, diff --git a/tests/__snapshots__/Combobox.test.tsx.snap b/tests/__snapshots__/Combobox.test.tsx.snap index 43deee07..60dba33c 100644 --- a/tests/__snapshots__/Combobox.test.tsx.snap +++ b/tests/__snapshots__/Combobox.test.tsx.snap @@ -15,6 +15,7 @@ exports[`Select.Combobox renders controlled correctly 1`] = ` aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -48,6 +49,7 @@ exports[`Select.Combobox renders correctly 1`] = ` aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" diff --git a/tests/__snapshots__/Multiple.test.tsx.snap b/tests/__snapshots__/Multiple.test.tsx.snap index f17631fa..60645adc 100644 --- a/tests/__snapshots__/Multiple.test.tsx.snap +++ b/tests/__snapshots__/Multiple.test.tsx.snap @@ -23,6 +23,7 @@ exports[`Select.Multiple render not display maxTagPlaceholder if maxTagCount not aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -143,6 +144,7 @@ exports[`Select.Multiple render truncates tags by maxTagCount and show maxTagPla aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -260,6 +262,7 @@ exports[`Select.Multiple render truncates tags by maxTagCount and show maxTagPla aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -361,6 +364,7 @@ exports[`Select.Multiple render truncates values by maxTagTextLength 1`] = ` aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" diff --git a/tests/__snapshots__/Select.test.tsx.snap b/tests/__snapshots__/Select.test.tsx.snap index 81b12000..6b44de06 100644 --- a/tests/__snapshots__/Select.test.tsx.snap +++ b/tests/__snapshots__/Select.test.tsx.snap @@ -123,6 +123,7 @@ exports[`Select.Basic no search 1`] = ` aria-controls="undefined_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="undefined_list" autocomplete="off" class="rc-select-selection-search-input" @@ -208,6 +209,7 @@ exports[`Select.Basic render renders correctly 1`] = ` aria-controls="undefined_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="undefined_list" autocomplete="off" class="antd-selection-search-input" @@ -255,6 +257,7 @@ exports[`Select.Basic render renders data-attributes correctly 1`] = ` aria-controls="undefined_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="undefined_list" autocomplete="off" class="antd-selection-search-input" @@ -300,6 +303,7 @@ exports[`Select.Basic render renders disabled select correctly 1`] = ` aria-controls="undefined_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="undefined_list" autocomplete="off" class="antd-selection-search-input" @@ -337,6 +341,7 @@ exports[`Select.Basic render renders role prop correctly 1`] = ` aria-controls="undefined_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="undefined_list" autocomplete="off" class="antd-selection-search-input" diff --git a/tests/__snapshots__/Tags.test.tsx.snap b/tests/__snapshots__/Tags.test.tsx.snap index ba9c0fb6..97c80cbd 100644 --- a/tests/__snapshots__/Tags.test.tsx.snap +++ b/tests/__snapshots__/Tags.test.tsx.snap @@ -79,6 +79,7 @@ exports[`Select.Tags OptGroup renders correctly 1`] = ` aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="true" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -252,6 +253,7 @@ exports[`Select.Tags render not display maxTagPlaceholder if maxTagCount not rea aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -369,6 +371,7 @@ exports[`Select.Tags render truncates tags by maxTagCount and show maxTagPlaceho aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -483,6 +486,7 @@ exports[`Select.Tags render truncates tags by maxTagCount and show maxTagPlaceho aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" @@ -581,6 +585,7 @@ exports[`Select.Tags render truncates values by maxTagTextLength 1`] = ` aria-controls="rc_select_TEST_OR_SSR_list" aria-expanded="false" aria-haspopup="listbox" + aria-label="Search" aria-owns="rc_select_TEST_OR_SSR_list" autocomplete="off" class="rc-select-selection-search-input" diff --git a/tests/__snapshots__/ssr.test.tsx.snap b/tests/__snapshots__/ssr.test.tsx.snap index 41628b24..9bf053f4 100644 --- a/tests/__snapshots__/ssr.test.tsx.snap +++ b/tests/__snapshots__/ssr.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Select.SSR should work 1`] = `"
"`; +exports[`Select.SSR should work 1`] = `"
"`;