mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-06 17:51:34 +02:00
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.
13 lines
488 B
Scheme
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>
|