autocomplete text box type=search for accessibility

1 Answer 86 Views
AutoComplete
ashutosh
Top achievements
Rank 1
Iron
Veteran
ashutosh asked on 28 Sep 2021, 07:41 AM

Hi Team,

Autocomplete textbox should have type=search to comply with the accessibility guideline [1.3.5 identify input purpose], but i do not see any way to do so.

any help is appreciated.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 30 Sep 2021, 10:11 AM

Hi Ashutosh,

The AutoComplete's input defaults to type=text as this is the proper type for the purpose of an AutoComplete input. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search#differences_between_search_and_text_types 

Typically, role="combobox" complies with accessibility compliance no matter what the type of input is. And currently, type=text is a valid option. Even if you change the type to search, the role attribute takes precedence to comply with accessibility guidelines. 

Regards,
Ianko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
AutoComplete
Asked by
ashutosh
Top achievements
Rank 1
Iron
Veteran
Answers by
Ianko
Telerik team
Share this question
or