Skip to content

Commit 015053b

Browse files
committed
fix: add accessibility specific requirements to agents file
1 parent add6cc1 commit 015053b

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ docs/requirements/ -> Detailed technical requirements
3030
- SCSS for styling, prefer Atlas UI classes, BEM-like naming with widget prefix
3131
- Conventional commits enforced: `type(scope): description`
3232
- Semver + CHANGELOG.md per package for runtime/XML/behavior changes
33-
- Jest + RTL for unit tests (src/**/__tests__/*.spec.ts)
34-
- Playwright for E2E (e2e/*.spec.js)
33+
- Jest + RTL for unit tests (src/\*_/**tests**/_.spec.ts)
34+
- Playwright for E2E (e2e/\*.spec.js)
3535

3636
## Development Setup
3737

docs/requirements/frontend-guidelines.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)