mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-28 13:20:20 +08:00
Add ARIA support for Fomantic UI checkboxes (#22599)
Replace #22593 This is a general approach to add ARIA support for all Fomantic UI checkboxes (including radioboxes) * Pros: * General approach, it works for all Fomantic UI checkboxes / radioboxes * No need to write IDs manually everywhere * No need to tell new contributors to write IDs again and again * Cons: * Slightly affects performance, but it's really trivial, because there was already a heavy `$('.ui.checkbox').checkbox()` for Fomantic UI before. So everything is still fine. Screenshot (from the repo setting page, which has various checkboxes): <details>  </details>
This commit is contained in:
@ -4,7 +4,7 @@ import {mqBinarySearch} from '../utils.js';
|
||||
import {createDropzone} from './dropzone.js';
|
||||
import {initCompColorPicker} from './comp/ColorPicker.js';
|
||||
import {showGlobalErrorMessage} from '../bootstrap.js';
|
||||
import {attachDropdownAria} from './aria.js';
|
||||
import {attachCheckboxAria, attachDropdownAria} from './aria.js';
|
||||
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
|
||||
import {initTooltip} from '../modules/tippy.js';
|
||||
import {svg} from '../svg.js';
|
||||
@ -111,7 +111,7 @@ export function initGlobalCommon() {
|
||||
});
|
||||
attachDropdownAria($uiDropdowns);
|
||||
|
||||
$('.ui.checkbox').checkbox();
|
||||
attachCheckboxAria($('.ui.checkbox'));
|
||||
|
||||
$('.tabular.menu .item').tab();
|
||||
$('.tabable.menu .item').tab();
|
||||
|
Reference in New Issue
Block a user