SearchBox Accessibility Error

2 Answers 109 Views
Accessibility
Issac
Top achievements
Rank 1
Iron
Issac asked on 24 May 2022, 05:18 PM

My pages fail Accessibility for using the SearchBox control with the following error;

"This input (type=text) element does not have a mechanism that allows an accessible name value to be calculated"

Any idea how to fix?

Thanks!

 

<telerik:RadSearchBox ID="RadSearchBox1" runat="server" TabIndex="15" Width="190px" DataSourceID="SqlDataSource1"
DataKeyNames="search" MaxResultCount="15" RenderMode="Lightweight" 
DataValueField="search" 
DataTextField="search"   
Filter="StartsWith" AccessKey="S" ToolTip="Search Box"                                                                          
OnButtonCommand="RadSearchBox1_ButtonCommand"
OnDataSourceSelect="RadSearchBox1_DataSourceSelect"
OnSearch="RadSearchBox1_Search" 
EmptyMessage="Search Here..."                                                                     
ShowSearchButton="false">
</telerik:RadSearchBox>
                                                               

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 25 May 2022, 09:15 AM

Hi Issac,

Can you please set the Label property of RadSearchBox which will render a label HTML tag and assign it to the searchbox input?

<telerik:RadSearchBox ID="RadSearchBox1" runat="server" TabIndex="15" Width="190px" 
Label="Search"
DataSourceID="SqlDataSource1"
DataKeyNames="search" MaxResultCount="15" RenderMode="Lightweight" 
DataValueField="search" 
DataTextField="search"   
Filter="StartsWith" AccessKey="S" ToolTip="Search Box"                                                                          
OnButtonCommand="RadSearchBox1_ButtonCommand"
OnDataSourceSelect="RadSearchBox1_DataSourceSelect"
OnSearch="RadSearchBox1_Search" 
EmptyMessage="Search Here..."                                                                     
ShowSearchButton="false">
</telerik:RadSearchBox>

If you still get this error, please specify:

  • which Accessibility Checker tool you are using?
  • what is the suggested markup/solution suggested by the accessibility tool, e.g. to apply aria-label to the input or something else?
  • what is the generated markup on your side in the browser devtools?

Regards,
Rumen
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/.

0
Issac
Top achievements
Rank 1
Iron
answered on 25 May 2022, 01:04 PM
Fixed, thanks!
Tags
Accessibility
Asked by
Issac
Top achievements
Rank 1
Iron
Answers by
Rumen
Telerik team
Issac
Top achievements
Rank 1
Iron
Share this question
or