Associate my own label with RadComboBox

2 posts, 1 answers
  1. Maxime
    Maxime avatar
    2 posts
    Member since:
    Jun 2020

    Posted 11 Jun Link to this post

    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.

  2. Answer
    Peter Milchev
    Admin
    Peter Milchev avatar
    858 posts

    Posted 12 Jun Link to this post

    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.
Back to Top