New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

WCAG 2.0 and Section 508 Accessibility Compliance

Basic information
Name:
Age:
Phone:
Date of Birth:
Hire information
Hire Date:
Salary:
E-mail:
Additional information:

Validate with WAVE

RadInput is compliant with Section 508 and Level AA of the WCAG 2.0 Guidelines. Run WAVE, the automated web accessibility evaluation tool, to check the accessibility level of the control yourself.

This example demonstrates how you can make Telerik ASP.NET RadInput accessible by leveraging the settings for the different caption and summary properties of the rendered HTML elements.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Language="C#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="true" Inherits="Telerik.InputExamplesCS.Examples.Accessibility.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function pageLoad() {
                setTimeout(function () {
                    document.getElementById("<%=Label1.ClientID%>").innerHTML = "";
                }, 3000);
            }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="demo-containers">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" RenderMode="Block" CssClass="demo-container" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <div id="Panel1">
                <div style="float: left; width: 45%">
                    <table summary="This form gathers basic information about the employee">
                        <thead>
                            <tr>
                                <th align="center" scope="col" colspan="2">Basic information
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Name:
                                </td>
                                <td>
                                    <telerik:RadTextBox RenderMode="Lightweight" ID="RadTextBox1" runat="server" Width="100%" ToolTip="Name" EmptyMessage="Employee name">
                                    </telerik:RadTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Age:
                                </td>
                                <td>
                                    <telerik:RadNumericTextBox RenderMode="Lightweight" ID="RadNumericTextBox1" runat="server" Width="100%" ToolTip="Name" NumberFormat-DecimalDigits="0" MaxValue="150" MinValue="0"
                                        EmptyMessage="Employee age">
                                    </telerik:RadNumericTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Phone:
                                </td>
                                <td>
                                    <telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox1" runat="server" Mask="(###) ###-####-####"
                                        Width="100%" ToolTip="Name" EmptyMessage="Enter phone number">
                                    </telerik:RadMaskedTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Date of Birth:
                                </td>
                                <td>
                                    <telerik:RadDateInput RenderMode="Lightweight" ID="RadDateInput1" runat="server" Width="100%" ToolTip="Name"
                                        EmptyMessage="Enter date of birth">
                                    </telerik:RadDateInput>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <telerik:RadInputManager RenderMode="Lightweight" ID="RadInputManager1" runat="server" EnableEmbeddedSkins="false">
                    <telerik:DateInputSetting EmptyMessage="Enter hire date" ErrorMessage="Invalid Date">
                        <TargetControls>
                            <telerik:TargetInput ControlID="TextBox1"></telerik:TargetInput>
                        </TargetControls>
                    </telerik:DateInputSetting>
                    <telerik:NumericTextBoxSetting EmptyMessage="Enter salary amount" MinValue="0" Type="Currency">
                        <TargetControls>
                            <telerik:TargetInput ControlID="TextBox2"></telerik:TargetInput>
                        </TargetControls>
                    </telerik:NumericTextBoxSetting>
                    <telerik:RegExpTextBoxSetting ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
                        ErrorMessage="Invalid Email" EmptyMessage="Enter employee email address">
                        <TargetControls>
                            <telerik:TargetInput ControlID="TextBox3"></telerik:TargetInput>
                        </TargetControls>
                    </telerik:RegExpTextBoxSetting>
                    <telerik:TextBoxSetting EmptyMessage="Enter additional info">
                        <TargetControls>
                            <telerik:TargetInput ControlID="TextBox4"></telerik:TargetInput>
                        </TargetControls>
                    </telerik:TextBoxSetting>
                </telerik:RadInputManager>
                <div style="float: left; padding-left: 10px; width: 45%;">
                    <table summary="This form gathers hire information about the employee" style="width: 340px;">
                        <thead>
                            <tr>
                                <th align="center" scope="col" colspan="2">Hire information
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>Hire Date:
                                </td>
                                <td style="width: 170px;">
                                    <asp:TextBox ID="TextBox1" runat="server" ToolTip="Name" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Salary:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox2" runat="server" ToolTip="Name" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>E-mail:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox3" runat="server" ToolTip="Name" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>Additional information:
                                </td>
                                <td>
                                    <asp:TextBox ID="TextBox4" runat="server" ToolTip="Name" Width="100%"></asp:TextBox>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <div style="clear: both">
            </div>
            <telerik:RadButton RenderMode="Lightweight" ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click"></telerik:RadButton>
            <asp:Label ID="Label1" runat="server" Font-Bold="true"></asp:Label><br />
        </telerik:RadAjaxPanel>
    </div>
    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">Validate with WAVE</asp:LinkButton>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance