Grid Checkbox Column accessibility

2 posts, 0 answers
  1. Raymond
    Raymond avatar
    20 posts
    Member since:
    Jul 2014

    Posted 07 Oct Link to this post

    I have a radgrid defined which contains a GridCheckBoxColumn.  Our accessibility evaluation tool is complaining because the input (checkbox) does not have a label associated with it.  I have EnableAriaSupport set to true on the radgrid.  I currently have a work around, which applies an "aria-label" attribute to the input in the idem created event.  But I'm hoping you can provide a better solution.  I'm including the column definition and my work around code below.

                                <telerik:GridCheckBoxColumn 
                                    UniqueName="Active"
                                    DataField="Active" 
                                    HeaderText="Active" 
                                    AllowFiltering="false"
                                    >
                                </telerik:GridCheckBoxColumn>

     

        Protected Sub grid_ItemCreated(sender As Object, e As GridItemEventArgs)
            If TypeOf e.Item Is GridDataItem Then
                Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)

                If TypeOf item("Active").Controls(0) Is CheckBox Then
                    Dim Ctrl As CheckBox = DirectCast(item("Active").Controls(0), CheckBox)

                    Ctrl.InputAttributes.Add("aria-label", "Active")
                End If

            End If
        End Sub

     

  2. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 12 Oct Link to this post

    Hi Raymond,

    I can confirm that the aria-label attribute is missing from the input element. I logged the issue in our system and you can track the progress in out Ideas&Feedback portal. Nevertheless, the approach that you are using is a valid one and it is the one I would recommend you for your case.

    Regards,
    Kostadin
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top