RadGrid 508 Accessibility.

4 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    17 posts
    Member since:
    May 2011

    Posted 09 Apr 2012 Link to this post

    I have a RadGrid. I want to make it UI accessible. In this grid I am using checkboxes for row selection like this:

       
    <telerik:GridClientSelectColumn UniqueName="headerSelectAll" ItemStyle-Width="40px"
    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="40px" HeaderStyle-HorizontalAlign="Center"  />          


     
    Each checkbox is clickable and I want that it will be 508 UI Accessible. Please suggest for it.

    Thanks.
  2. Martin
    Admin
    Martin avatar
    833 posts

    Posted 12 Apr 2012 Link to this post

    Hello Sandeep,

    You can specify empty text (or some tooltips) for the checkboxes from the GridClientSelectColumn intercepting the ItemCreated server event of the control. In it you can reference the checkbox in the column cells accessing the first control in the cell's Controls collection. For example:

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = e.Item as GridDataItem;
            (item["headerSelectAll"].Controls[0] as CheckBox).Text = "&nbsp;";
        }
        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem item = e.Item as GridHeaderItem;
            (item["headerSelectAll"].Controls[0] as CheckBox).Text = "&nbsp;";
        }
    }

    Further information about the section 508 compliance requirements and how they can be fulfilled by RadGrid is available in this help topic.

    Greetings,
    Martin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Sandeep
    Sandeep avatar
    17 posts
    Member since:
    May 2011

    Posted 19 Apr 2012 Link to this post

    Thanks Martin

    When I use ToolTip property of checkboxes then these don't access but when I define Text property then these are accessible.

    OR

    When I use Tooltip Property and Text Property empty then these are accessible. So I write code like:


     
    protected void radGrid_ItemCreated(object sender, GridItemEventArgs e)
    {
    if (e.Item is GridDataItem)
      {
      GridDataItem item = e.Item
    as GridDataItem;
                  item[
    "headerSelectAll"].Controls[0] as CheckBox).Text = "&nbsp";
                    (item[
    "headerSelectAll"].Controls[0] as CheckBox).ToolTip = "clickable checkbox";
             }
           if (e.Item is GridHeaderItem)
            {
                   GridHeaderItem item = e.Item
    as GridHeaderItem;
                   (item[
    "headerSelectAll"].Controls[0] as CheckBox).Text = "&nbsp";
                 (item[
    "headerSelectAll"].Controls[0] as CheckBox).ToolTip = "clickable checkbox";
            }
      }

    Because empty text have not mean and Screen Reader read alternate Text(ToolTip)[My thought not confirm]. So This approach is correct or Wrong ? Please Suggest.

    Thanks
  4. Martin
    Admin
    Martin avatar
    833 posts

    Posted 23 Apr 2012 Link to this post

    Hello Sandeep,

    Since all visible INPUT elements must have a label, either by using a linked or containing LABEL element, or by using the ALT or TITLE attribute it is up to the developer what approach to implement. By design the GridClientSelectColumn check box controls do not render those attributes or labels so you can follow the approach form my previous post and accommodate it per your particular scenario.

    I hope this helps.

    All the best,
    Martin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top