AutoCompleteBox - WAI-ARIA Support

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

The RadAutoCompleteBox control has WAI-ARIA support which can be easily enabled by setting EnableAriaSupport="true".

In order to use WAI-ARIA the form element on the page must have a role attribute set to "application" (role="application"). For more information on this requirement see W3C: WAI-ARIA

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="true"  Inherits="AutoCompleteBox_Examples_Accessibility_and_Internationalization_DefaultCS" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container size-thin">
        <telerik:RadAutoCompleteBox RenderMode="Lightweight" EnableAriaSupport="true" AccessKey="W" ID="RadAutoCompleteBox1"
            
            runat="server"
            Width="300"
            MaxResultCount="5"
            DropDownHeight="180"
            DataSourceID="SqlDataSource1"
            DataTextField="ContactName"
            EmptyMessage="Select Customers"
            DataValueField="CustomerID">
        </telerik:RadAutoCompleteBox>
    </div>

    <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT [CustomerID], [ContactName] FROM [Customers] ORDER By ContactName"></asp:SqlDataSource>

    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?