This is a migrated thread and some comments may be shown as answers.

Grid Checkbox Column accessibility

1 Answer 405 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raymond
Top achievements
Rank 1
Raymond asked on 07 Oct 2016, 05:13 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 12 Oct 2016, 01:52 PM
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.
Tags
Grid
Asked by
Raymond
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or