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

Associate my own label with RadComboBox

1 Answer 288 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Maxime
Top achievements
Rank 1
Maxime asked on 11 Jun 2020, 06:03 PM

Hello,

When I validate the RadComboBox for the WCAG 2.0 and Section 508 Accessibility Compliance with WAVE, I can see there are some warning/errors.

For instance, the RadComboBox has a tooltip property, which bring the title attribute on the input, but WAVE would prefer to have a label linked to the input instead.
I know there is a Label property that I can set, which generate a label beside the RadComboBox, but I want to link my own label to the ComboBox. 
I could simply do this myLabel.AssociatedControlID(comboBoxId + "_Input");, but I'd rather not do this, in case the combobox change in a future update and the input id is not "comboBoxId + "_Input".

Is it any other way to do it? The best way would have been to access the ClientId of the input within the RadComboBox object.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 12 Jun 2020, 02:05 PM

Hello Maxime,

You can set the AriaSettings of the control, either the AriaSettings-Label (sets the aria-label attribute to the input) or the AriaSettings-DescribedBy(sets aria-describedby attribute to the input).

If you have an external label that would describe the function of the ComboBox, you can set the DescribedBy attribute:

 <AriaSettings DescribedBy="Label1" />

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ComboBox
Asked by
Maxime
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or