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

Adding an aria-label attribute to the tag

1 Answer 1518 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Iron
Mike asked on 26 Mar 2018, 03:25 PM

I need to add an aria label to the li of the selected tags for the multiselect control.  This is so that navigating with the keyboard over the selected tags will allow a screen reader to read the selections. I've tried using the tagTemplate, but that doesn't appear to get me access to the list item, only the span inside it.  How can I add the aria-label attribute to the li element so that it looks like:

<li class="k-button k-state-focused" deselectable="on" aria-label="Doe, John" id="select2_tag_active">
 
    <span deselectable="on" >Doe, John</span>
 
    <span unselectable="on" aria-label="delete" class="k-select"><span class="k-icon k-i-close"></span></span>
 
</li>

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 28 Mar 2018, 09:23 AM
Hello Mike,

You can set aria-label attribute to the MultiSelect tags li elements in the widget's change event handler with jQuery: dojo example.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MultiSelect
Asked by
Mike
Top achievements
Rank 1
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or