silverstripe-framework/templates/SilverStripe/Forms/CheckboxSetField.ss
Ramon Lapenta 9c7eac481e Add "option" to list elements that belong to "listbox"
The accessibility attribute `role="listbox"` requires its immediate children to be set as `role="option"`, currently they don't have this option and accessibility tests are failing.
2020-03-10 11:10:04 -06:00

13 lines
488 B
Scheme

<ul $AttributesHTML>
<% if $Options.Count %>
<% loop $Options %>
<li class="$Class" role="$Role">
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value.ATT"<% if $isChecked %> checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> />
<label for="$ID">$Title</label>
</li>
<% end_loop %>
<% else %>
<li><%t SilverStripe\\Forms\\CheckboxSetField_ss.NOOPTIONSAVAILABLE 'No options available' %></li>
<% end_if %>
</ul>