Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
70e9404
chore(poc): use ai to apply aria specs to rendering specs directly
gdenchevprog Nov 26, 2025
1512820
Merge branch 'develop' into poc-apply-aria-to-html-specs
dtopalov Dec 3, 2025
727590e
feat(a11y): add ARIA validation tools and apply to avatar & icon
dtopalov Dec 4, 2025
07b5433
chore(docs): update utils documentation after rebase
dtopalov Dec 4, 2025
f984362
chore: update visual previews
kendo-bot Dec 4, 2025
87480c1
chore(utils): update docs with motion variables from develop
dtopalov Dec 4, 2025
678df65
feat(a11y): add page-level violation filtering to WCAG test
dtopalov Dec 4, 2025
04569f6
feat(a11y): apply ARIA to button component
dtopalov Dec 4, 2025
aba50b7
chore: update visual previews
kendo-bot Dec 4, 2025
2260fe5
feat(a11y): apply ARIA to checkbox component
dtopalov Dec 4, 2025
5ebdfd3
chore(a11y): update progress tracking for checkbox
dtopalov Dec 4, 2025
a759838
chore: update visual previews
kendo-bot Dec 4, 2025
f1efb3d
feat(a11y): apply ARIA to chip component
dtopalov Dec 5, 2025
3f0bca1
chore(a11y): update progress tracking for chip
dtopalov Dec 5, 2025
e907fb7
chore: update visual previews
kendo-bot Dec 5, 2025
cd52cec
fix(a11y): use 'all' swatch in tests to ensure proper theming
dtopalov Dec 5, 2025
e18ecbf
chore(a11y): update progress tracking
dtopalov Dec 5, 2025
5bfa7d0
chore: update visual previews
kendo-bot Dec 5, 2025
3936920
feat(a11y): apply ARIA to rating and switch, complete circular-progre…
dtopalov Dec 5, 2025
c152c00
feat(a11y): use ocean-blue-a11y swatch for WCAG compliance
dtopalov Dec 5, 2025
fe9e451
chore: update visual previews
kendo-bot Dec 5, 2025
f03356d
feat(captcha): apply ARIA spec for accessibility compliance
dtopalov Dec 5, 2025
495410e
chore: update visual previews
kendo-bot Dec 5, 2025
54fbbf3
fix(captcha): use visible label element instead of aria-label
dtopalov Dec 5, 2025
58c9e29
chore: update visual previews
kendo-bot Dec 5, 2025
a6b450a
feat(dateinput): apply ARIA spec for accessibility compliance
dtopalov Dec 5, 2025
21caac5
chore: update visual previews
kendo-bot Dec 5, 2025
b551d83
chore: inputs compliant
dtopalov Dec 5, 2025
b6059b8
chore: update visual previews
kendo-bot Dec 5, 2025
506e371
Merge branch 'develop' into poc-apply-aria-to-html-specs
dtopalov Dec 17, 2025
aa723d7
chore: color gradient updates
dtopalov Dec 17, 2025
7ddeef8
chore: fix lint
dtopalov Dec 17, 2025
e18b98e
chore: update visual previews
kendo-bot Dec 17, 2025
004840a
chore: revert changes to inner folders
dtopalov Dec 17, 2025
783b173
chore: update visual previews
kendo-bot Dec 17, 2025
84c579e
chore: add new components
dtopalov Dec 17, 2025
0fd57e2
chore: update visual previews
kendo-bot Dec 17, 2025
c03c651
feat(html): apply ARIA to ComboBox, DropdownList, MultiSelect, ListBox
dtopalov Dec 18, 2025
d6fd3cc
chore: update visual previews
kendo-bot Dec 18, 2025
f5ddef9
chore: add more components
dtopalov Dec 19, 2025
6f22de9
chore: update visual previews
kendo-bot Dec 19, 2025
1edb5a3
chore: fix lint and tests
dtopalov Dec 19, 2025
49d3dd4
chore: update visual previews
kendo-bot Dec 19, 2025
038bcf8
docs(a11y): update workflows for V2 requirements
dtopalov Jan 28, 2026
1523f77
chore: merge develop with clean slate for ARIA re-application
dtopalov Jan 28, 2026
137d0e4
fix(icon): ensure aria-hidden attribute is applied after spreading ot…
dtopalov Jan 28, 2026
6982242
fix(avatar): add alt attributes to avatar images for WCAG compliance
dtopalov Jan 28, 2026
c20f38b
fix(button): add aria-label to icon-only buttons for WCAG compliance
dtopalov Jan 28, 2026
8d6858c
feat(chip): add standalone chip test to cover untested ARIA rules
dtopalov Jan 28, 2026
1c401aa
feat(dialog): apply ARIA attributes for accessibility
dtopalov Jan 28, 2026
793a883
feat(window): apply ARIA attributes for accessibility
dtopalov Jan 28, 2026
a76aea2
feat(dialog): add predefined dialog tests (alert, confirm, prompt)
dtopalov Jan 28, 2026
8dca321
fix(validator): fix ARIA spec markdown parser for empty selector cells
dtopalov Jan 28, 2026
ea48967
fix(validator): handle selector specificity and aria-label alternatives
dtopalov Jan 28, 2026
d754e53
fix(aria-validator): handle conditional attributes properly
dtopalov Jan 28, 2026
95cbb81
feat(daterangepicker): implement aria-activedescendant with focused c…
dtopalov Jan 28, 2026
f962875
chore: merge develop with a11y-preserving conflict resolution
dtopalov Jan 28, 2026
de6ed77
chore: restore visual preview PNGs from develop
dtopalov Jan 28, 2026
922e2c4
chore: update visual previews
kendo-bot Jan 28, 2026
b3982ae
fix(html): resolve a11y typecheck and lint errors
dtopalov Jan 28, 2026
eb074c9
chore: update visual previews
kendo-bot Jan 28, 2026
8403a76
fix(html): keep textarea wrapper props to avoid visual diffs
dtopalov Jan 28, 2026
65ba410
chore(html): prevent textarea className override
dtopalov Jan 28, 2026
f43b6fc
chore: update visual previews
kendo-bot Jan 28, 2026
c8f1d9f
chore(slider): apply range slider aria-valuetext
dtopalov Jan 28, 2026
d24c7b5
chore: update visual previews
kendo-bot Jan 28, 2026
65b0325
chore(colorgradient): apply aria updates
dtopalov Jan 28, 2026
f8cc55d
chore: update agent instructions
dtopalov Jan 28, 2026
5d0590a
chore: update visual previews
kendo-bot Jan 28, 2026
4f9dca6
chore(colorpalette): apply aria updates
dtopalov Jan 28, 2026
370e445
chore(colorpicker): apply aria updates
dtopalov Jan 28, 2026
56cc07d
chore: update visual previews
kendo-bot Jan 28, 2026
f769453
chore: add dropdowns and listview
dtopalov Jan 29, 2026
3f7901c
chore: update visual previews
kendo-bot Jan 29, 2026
6f491a5
chore(aria): update multiselect components
dtopalov Jan 29, 2026
3ae50e6
chore: fix lint
dtopalov Jan 29, 2026
11abf2f
chore: update visual previews
kendo-bot Jan 29, 2026
13578fc
chore: revert test changes
dtopalov Jan 29, 2026
f4b266e
chore: regenerate test pages
dtopalov Jan 29, 2026
748f8b7
chore: update visual previews
kendo-bot Jan 29, 2026
1929815
chore: update instructions
dtopalov Jan 29, 2026
7748110
chore(merge): merge develop into poc-apply-aria-to-html-specs
dtopalov Jan 29, 2026
3d054bd
chore: update visual previews
kendo-bot Jan 29, 2026
7bda040
chore(a11y): update aria specs and tests
dtopalov Jan 29, 2026
2aa3c26
chore: update visual previews
kendo-bot Jan 29, 2026
65d4280
chore(html): fix typecheck errors
dtopalov Jan 29, 2026
4175cc5
chore(a11y): add commit format rule to accessibility agent instructions
dtopalov Jan 30, 2026
a10a6c1
chore: update visual previews
kendo-bot Jan 30, 2026
c350f30
chore: finish navigation group
dtopalov Jan 30, 2026
a189bdf
chore: merge dev resolve conflicts
dtopalov Jan 30, 2026
345a92c
chore: reapply dropdowns new spec
dtopalov Jan 30, 2026
93b4aaa
chore: update visual previews
kendo-bot Jan 30, 2026
c4e233d
chore: add containers
dtopalov Jan 30, 2026
b3b5d4c
chore: update visual previews
kendo-bot Jan 30, 2026
ed77934
chore: finish containers
dtopalov Jan 30, 2026
0891d50
chore: update visual previews
kendo-bot Jan 30, 2026
5b86931
chore: add calendars
dtopalov Jan 31, 2026
b450b5f
chore: update visual previews
kendo-bot Jan 31, 2026
e9c3792
chore: pager
dtopalov Feb 1, 2026
4cc666a
chore: update visual previews
kendo-bot Feb 1, 2026
119c154
chore: filter
dtopalov Feb 1, 2026
2f68e7b
chore: update visual previews
kendo-bot Feb 1, 2026
de00ce5
chore: merge develop - keep ARIA accessibility features in OTP component
dtopalov Feb 2, 2026
f5b8e14
chore(a11y): add pre-commit accessibility workflow
dtopalov Feb 2, 2026
b2f33ad
chore: add spec generation script
dtopalov Feb 3, 2026
cefe23e
chore: compliance report update
dtopalov Feb 3, 2026
4935826
chore: update visual previews
kendo-bot Feb 3, 2026
fe58a34
chore(a11y): fix pre-commit prompt handling
dtopalov Feb 3, 2026
356ea7b
chore: update automation
dtopalov Feb 3, 2026
faf61d6
docs(a11y): add automation tools guide and workflow instructions
dtopalov Feb 3, 2026
95f8afb
chore: add and revamp instructions for a11y
dtopalov Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
500 changes: 500 additions & 0 deletions .github/agents/accessibility.agent.md

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ packages/
├── fluent/ # Fluent theme
├── utils/ # Utility CSS classes (standalone)
└── html/ # React component specs & tests
aria/ # ARIA accessibility specifications (per-component)
scripts/ # Build utilities and automation
tests/ # Visual test outputs
build/ # CI/CD scripts
Expand Down Expand Up @@ -143,6 +144,10 @@ npm run clean # Full cleanup (includes node_modules)

- Refer to ${variable-docs.prompt.md} for SassDoc documentation standards

### Accessibility

- Refer to ${accessibility.prompt.md} for ARIA attribute patterns and WCAG compliance

### SCSS Standards

- Use **dart-sass syntax** - avoid deprecated node-sass features
Expand All @@ -168,6 +173,36 @@ npm run clean # Full cleanup (includes node_modules)
- **Linting** - Enforced on all commits via Husky + lint-staged
- **Accessibility tests** - Run automatically on default-ocean-blue-a11y swatch

### Accessibility Automation

ARIA specifications in `aria/[component]_aria.md` define accessibility requirements for each component. These specs are applied directly to TSX component files.

**Workflow:**
1. Check ARIA spec: `aria/[component]_aria.md`
2. Apply attributes to: `packages/html/src/[component]/*.spec.tsx` and `templates/*.tsx`
3. Verify coverage: ensure all spec rules match rendered HTML
4. Add templates: create new templates for unmatched scenarios (disabled, expanded, etc.)
5. Export templates: update `index.ts` to export new templates for consuming products
6. Validate: `npm run test:aria [component]`
7. Check WCAG: `npm run test:wcag [component]`

**Key Commands:**
```bash
npm run test:aria [component] # Validate against aria/*.md spec rules
npm run test:wcag [component] # Validate WAI-ARIA standards via axe-core
npm run test:a11y # Run ARIA + WCAG + contrast tests
npm run test:contrast # Validate color contrast ratios
```

**Guidelines:**
- Add ARIA attributes after `className` prop
- Use semantic HTML elements when possible
- Use `${id}-suffix` pattern for related IDs
- Never modify HTML structure, only add attributes
- Icon-only buttons require `aria-label`

For detailed patterns, see: `.github/prompts/accessibility.prompt.md`

## Common Issues

- **Unit tests failing**: Run `npm run docs` first to generate metadata
241 changes: 241 additions & 0 deletions .github/docs/accessibility-automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
# Accessibility Automation Tools

This document describes the automation scripts and workflows available for ARIA specification management and accessibility compliance testing.

## Available Commands

### ARIA Spec Generation

**Generate ARIA spec from component TSX analysis:**
```bash
npm run aria:generate [component]
npm run aria:generate [component] -- --force # Overwrite existing spec
npm run aria:generate [component] -- --dry-run # Preview without writing
```

**What it does:**
- Analyzes component TSX files for classes, elements, and patterns
- Matches component to WAI-ARIA patterns (button, dialog, listbox, etc.)
- Generates markdown spec with recommended ARIA attributes
- Detects child component imports and adds references

**Output:** Creates/updates `aria/[component]_aria.md`

### Full Accessibility Sync

**Comprehensive workflow: analyze, spec, validate, test:**
```bash
npm run aria:sync [component] # Sync single component
npm run aria:sync [component] --verbose # Detailed output
npm run aria:sync --changed # All changed components (git diff)
npm run aria:sync --all # All components with specs
npm run aria:sync --check # CI mode (exit non-zero on failure)
npm run aria:sync [component] -i # Interactive mode (retry loop)
```

**What it does:**
1. Checks component exists in packages/html/src/
2. Builds test HTML if needed (npm run build:tests)
3. Creates ARIA spec if missing (calls aria:generate)
4. Validates spec selectors against rendered HTML
5. Runs ARIA attribute validation (npm run test:aria)
6. Runs WCAG compliance tests (npm run test:wcag)
7. Reports results with actionable suggestions

**Use cases:**
- Development: `npm run aria:sync button -i` (iterative fix-test loop)
- Pre-push: `npm run aria:sync --changed` (validate your changes)
- CI: `npm run aria:sync --check --changed` (gate merges)

### Individual Test Commands

**ARIA attribute validation:**
```bash
npm run test:aria [component] # Validate against spec
npm run test:aria [component] -- --verbose # Show detailed violations
```

**WCAG compliance testing:**
```bash
npm run test:wcag [component] # Run axe-core tests
npm run test:wcag [component] -- --verbose # Detailed violation reports
npm run test:wcag [component] -- --level=aaa # Test AAA level
```

**Color contrast testing:**
```bash
npm run test:contrast # Check all theme swatches
```

**Render test pages:**
```bash
npm run test:render-test-pages [component] # Generate HTML from TSX tests
npm run build:tests # Build all test components
```

### Git Hook Integration

**Pre-commit (info-only):**
- Shows which a11y files changed
- Non-blocking, informational only
- Automatically runs via Husky

**Pre-push (with prompt):**
- Prompts to run accessibility tests
- Can skip (tests run in CI anyway)
- Blocks push if tests fail
- Uses `/dev/tty` for proper TTY handling

**Manual run:**
```bash
node scripts/a11y-pre-commit.mjs # Interactive mode
node scripts/a11y-pre-commit.mjs --info-only # Show changes only
node scripts/a11y-pre-commit.mjs --prompt # Ask before testing
node scripts/a11y-pre-commit.mjs --check-only # Block on failures
```

## Workflow Mappings

### Workflow 1: Create ARIA Spec from HTML

**Manual approach (for learning/review):**
1. Read component TSX files in `packages/html/src/[component]/`
2. Research ARIA patterns at https://www.w3.org/WAI/ARIA/apg/
3. Create `aria/[component]_aria.md` following template
4. Document all selectors, attributes, and states

**Automated approach:**
```bash
npm run aria:generate [component]
# Review and edit generated spec as needed
```

### Workflow 2: Apply ARIA to Component

**Standard workflow:**
1. Read ARIA spec from `aria/[component]_aria.md`
2. Apply attributes to TSX components (root level or templates/ only)
3. Build tests: `npm run build:tests`
4. Render pages: `npm run test:render-test-pages [component]`
5. Validate: `npm run test:aria [component]`
6. Check WCAG: `npm run test:wcag [component]`
7. Fix violations and repeat

**Quick check workflow:**
```bash
npm run aria:sync [component]
# Shows status, suggests fixes
```

**Iterative workflow:**
```bash
npm run aria:sync [component] -i
# Prompts to retry after each fix
```

### Workflow 4: End-to-End (Spec + Apply)

**Full automation:**
```bash
npm run aria:sync [component]
```

This single command:
- ✓ Creates spec if missing (via aria:generate)
- ✓ Validates spec against HTML
- ✓ Runs ARIA tests
- ✓ Runs WCAG tests
- ✓ Reports results with fix suggestions

**For new components:**
```bash
# Generate initial spec
npm run aria:generate [component]

# Review and customize the spec
# Edit aria/[component]_aria.md as needed

# Apply ARIA to TSX components
# Edit packages/html/src/[component]/**/*.tsx

# Validate everything
npm run aria:sync [component]
```

## Script Architecture

### generate-aria-spec.mjs
- **Purpose:** Analyze TSX and generate ARIA spec markdown
- **Exports:** Shared constants (ARIA_PATTERNS, STATE_TO_ARIA, etc.) and functions (analyzeComponent, readExistingSpec) for reuse
- **Used by:** aria-sync.mjs imports shared utilities

### aria-sync.mjs
- **Purpose:** Comprehensive sync workflow (spec + validate + test)
- **Imports from:** generate-aria-spec.mjs (shared utilities)
- **Key difference:** Analyzes rendered HTML (tests/*.html) not TSX source

### a11y-pre-commit.mjs
- **Purpose:** Git hook integration for a11y validation
- **Modes:** info-only, prompt, check-only
- **TTY handling:** Uses /dev/tty for prompts in git hooks

## Best Practices

### During Development
- Use `npm run aria:sync [component] -i` for iterative work
- Run `npm run test:aria [component] -- --verbose` to see details
- Check `npm run test:wcag [component] -- --verbose` for violations

### Before Committing
- Pre-commit hook shows changed a11y files (automatic)
- Run `npm run aria:sync --changed` to validate locally

### Before Pushing
- Pre-push hook prompts to run tests (automatic)
- Can skip if CI will catch issues
- Or use `git push --no-verify` to bypass

### In CI/CD
- Use `npm run aria:sync --check --changed` as gate
- Exits non-zero on failures (blocks merge)
- Runs on changed components only (fast)

## Common Issues

### "No test HTML files found"
```bash
npm run build:tests
npm run test:render-test-pages [component]
```

### "Missing ARIA spec"
```bash
npm run aria:generate [component]
# Review and edit aria/[component]_aria.md
```

### "Spec selectors don't match HTML"
- Component markup may have changed
- Regenerate spec: `npm run aria:generate [component] -- --force`
- Or manually update `aria/[component]_aria.md`

### ARIA validation failures
```bash
npm run test:aria [component] -- --verbose
# Shows specific violations with selectors
# Apply missing attributes to TSX
```

### WCAG failures (non-label violations)
```bash
npm run test:wcag [component] -- --verbose
# Fix reported issues (missing roles, labels, etc.)
# Note: Label-related violations ignored (handled separately)
```

## References

- **ARIA Specs:** `aria/*.md` files
- **WAI-ARIA APG:** https://www.w3.org/WAI/ARIA/apg/
- **WCAG 2.2:** https://www.w3.org/TR/WCAG22/
- **Test Output:** `tests/_output/` directory
Loading
Loading