@@ -41,3 +41,21 @@ This guide provides best practices for front-end development in Mendix pluggable
4141- ** Layout and Sizing:** Use flexible layouts (e.g., percentage widths, flexbox) that adapt to container sizes.
4242- ** No Overriding Atlas Core Classes:** Do not override core Atlas classes; wrap widget elements if custom styling is needed.
4343- ** Example – Consistent Button:** Use ` <button class="btn btn-secondary" type="button">Click</button> ` instead of custom-styled divs.
44+
45+ ## Accessibility Requirements
46+
47+ - Follow WCAG 2.2 AA standards
48+ - ** Prefer semantic HTML over ARIA** - use native elements (` <button> ` , ` <nav> ` , ` <dialog> ` ) before adding ARIA attributes
49+ - First rule of ARIA: don't use ARIA if semantic HTML achieves the same result
50+ - Only add ARIA when the native element doesn't convey the right semantics (e.g., ` role="menu" ` for dropdown menus vs navigation links)
51+ - Implement full keyboard navigation for interactive elements:
52+ - Arrow keys for menu/list navigation
53+ - Enter/Space for activation
54+ - Escape for dismissal
55+ - Tab for focus management
56+ - Use roving tabindex pattern for lists/menus (active item: tabIndex=0, others: tabIndex=-1)
57+ - For floating elements (menus, tooltips, popovers): use Floating UI's accessibility hooks
58+ - ` useRole ` , ` useDismiss ` , ` useListNavigation ` , ` FloatingFocusManager `
59+ - Test accessibility changes with unit tests (ARIA attributes, keyboard handlers) and E2E tests (navigation flows)
60+ - ** Contrast checking** - Minimum ratios: 4.5:1 for normal text, 3:1 for large text (AA standard) and GUI elements
61+ - ** Less is more** - avoid over-engineering accessibility; focus on what actually improves screen reader and keyboard user experience
0 commit comments