We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae3268c commit 9b94b39Copy full SHA for 9b94b39
web_src/js/features/aria.js
@@ -101,6 +101,11 @@ export function attachDropdownAria($dropdowns) {
101
102
export function attachCheckboxAria($checkboxes) {
103
$checkboxes.checkbox();
104
+
105
+ // Fomantic UI checkbox needs to be something like: <div class="ui checkbox"><label /><input /></div>
106
+ // It doesn't work well with <label><input />...</label>
107
+ // To make it work with aria, the "id"/"for" attributes are necessary, so add them automatically if missing.
108
+ // In the future, refactor to use native checkbox directly, then this patch could be removed.
109
for (const el of $checkboxes) {
110
const label = el.querySelector('label');
111
const input = el.querySelector('input');
0 commit comments