How can I correctly associate the label generated by Html.LabelFor() with my MVC Kendo DropDownListFor(). It seems like it should work but is not read by the screen reader, perhaps due to the hidden input field.
<div class="input-block-level">
@Html.LabelFor(m => m.BirthdayMonth, new {@class = "col-md-5 control-label"})
<div class="col-md-3">
@(Html.Kendo().DropDownListFor(m => m.BirthdayMonth)
.Name("BirthdayMonth")
.OptionLabel("Month")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<SelectListItem>
{
new SelectListItem {Text = "01 - Jan", Value = "1"},
new SelectListItem {Text = "02 - Feb", Value = "2"},
[...etc...]
new SelectListItem {Text = "11 - Nov", Value = "11"},
new SelectListItem {Text = "12 - Dec", Value = "12"}
})
.HtmlAttributes(new {@class = "form-control", style = "width:100px"})
.Deferred()
)
</div>
</div>
Thanks,
Gary Davis