Wiki source code of Accessibility
Last modified by Thiago Krieck on 2026/11/18 14:13
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning title="Draft"}} | ||
| 2 | This page is a draft. The standards on it are proposals still under discussion, so they may change and should not be treated as final yet. | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | = The standard = | ||
| 6 | |||
| 7 | * **Target:** All XWiki UI should meet WCAG 2.2 level AA, since this is the level XWiki has committed to. | ||
| 8 | * **Semantics first:** Native HTML elements (##{{{<button>}}}##, ##{{{<label>}}}##, ##{{{<dialog>}}}##-like Bootstrap modals with ##{{{role="dialog"}}}##) should be preferred over ARIA, since they bring keyboard and screen reader support for free. | ||
| 9 | * **Keyboard:** Everything that can be done with a mouse should be doable with the keyboard, with a visible focus indicator. | ||
| 10 | * **Names:** Every control should have an accessible name, including icon-only buttons and repeated actions in lists. See [[Buttons>>doc:UserExperience.UIStandards.Components.Buttons.WebHome]] and [[Action labels>>doc:UserExperience.UIStandards.Content.ActionLabels.WebHome]]. | ||
| 11 | * **Automated checks:** UI tests run axe-core against the WCAG 2.0, 2.1 and 2.2 A/AA rules. A new violation should be fixed rather than added to the list of rules that only warn. | ||
| 12 | * **Manual checks:** Color contrast, labels, target size, scrollable regions and links inside text are not enforced by the automated checks, so they should be checked by hand for any new UI. | ||
| 13 | |||
| 14 | = Testing = | ||
| 15 | |||
| 16 | * Java UI tests: run the functional tests with ##{{{-Dxwiki.test.ui.wcag=true}}}## to validate every page a test visits. Reports are written to ##{{{target/wcag-reports/}}}##. | ||
| 17 | |||
| 18 | = More = | ||
| 19 | |||
| 20 | * [[Accessibility on dev.xwiki.org>>https://dev.xwiki.org/xwiki/bin/view/Community/Accessibility/]] | ||
| 21 | * [[WCAG testing on dev.xwiki.org>>https://dev.xwiki.org/xwiki/bin/view/Community/Testing/WCAGTesting/]] | ||
| 22 | * Related: [[Buttons>>doc:UserExperience.UIStandards.Components.Buttons.WebHome]], [[Forms and inputs>>doc:UserExperience.UIStandards.Components.FormsAndInputs.WebHome]], [[Modal>>doc:UserExperience.UIStandards.Components.Modal.WebHome]], [[Menus and dropdowns>>doc:UserExperience.UIStandards.Components.MenusAndDropdowns.WebHome]], [[Action labels>>doc:UserExperience.UIStandards.Content.ActionLabels.WebHome]] |