]> BookStack Code Mirror - bookstack/blobdiff - resources/views/components/custom-checkbox.blade.php
Added crude example of captcha usage
[bookstack] / resources / views / components / custom-checkbox.blade.php
index 57ab1342c470a7d937fbc80a042fa885deb8c096..6ba2f457f88925f6b4dad718fbd176e6bdc9aed7 100644 (file)
@@ -3,9 +3,13 @@ $name
 $value
 $checked
 $label
+$tabindex
 --}}
-<label class="toggle-switch @if($errors->has($name)) neg @endif">
+<label custom-checkbox class="toggle-switch @if($errors->has($name)) text-neg @endif">
     <input type="checkbox" name="{{$name}}" value="{{ $value }}" @if($checked) checked="checked" @endif>
-    <span class="custom-checkbox text-primary">@icon('check')</span>
+    <span tabindex="{{ $tabindex ?? '0' }}"
+          role="checkbox"
+          aria-checked="{{ $checked ? 'true' : 'false' }}"
+          class="custom-checkbox text-primary">@icon('check')</span>
     <span class="label">{{$label}}</span>
 </label>
\ No newline at end of file