# Background This document is used as aria/accessibility(a11y) reference for future developers. There are a lot of a11y problems in the Fomantic UI library. This `aria.js` is used as a workaround to make the UI more accessible. The `aria.js` is designed to avoid touching the official Fomantic UI library, and to be as independent as possible, so it can be easily modified/removed in the future. To test the aria/accessibility with screen readers, developers can use the following steps: * On macOS, you can use VoiceOver. * Press `Command + F5` to turn on VoiceOver. * Try to operate the UI with keyboard-only. * Use Tab/Shift+Tab to switch focus between elements. * Arrow keys to navigate between menu/combobox items (only aria-active, not really focused). * Press Enter to trigger the aria-active element. * On Android, you can use TalkBack. * Go to Settings -> Accessibility -> TalkBack, turn it on. * Long-press or press+swipe to switch the aria-active element (not really focused). * Double-tap means old single-tap on the aria-active element. * Double-finger swipe means old single-finger swipe. * TODO: on Windows, on Linux, on iOS # Checkbox ## Accessibility-friendly Checkbox The ideal checkboxes should be: ```html ``` However, related CSS styles aren't supported (not implemented) yet, so at the moment, almost all the checkboxes are still using Fomantic UI checkbox. ## Fomantic UI Checkbox ```html
``` Then the JS `$.checkbox()` should be called to make it work with keyboard and label-clicking, then it works like the ideal checkboxes. There is still a problem: Fomantic UI checkbox is not friendly to screen readers, so we add IDs to all the Fomantic UI checkboxes automatically by JS. If the `label` part is empty, then the checkbox needs to get the `aria-label` attribute manually. # Dropdown ## Fomantic UI Dropdown Fomantic Dropdown is designed to be used for many purposes: * Menu (the profile menu in navbar, the language menu in footer) * Popup (the branch/tag panel, the review box) * Simple `
Default
```