Skip to content

feat(linter): implement aria/proptypes#17253

Merged
camc314 merged 6 commits intooxc-project:mainfrom
mehm8128:feat/aria-proptypes
Dec 22, 2025
Merged

feat(linter): implement aria/proptypes#17253
camc314 merged 6 commits intooxc-project:mainfrom
mehm8128:feat/aria-proptypes

Conversation

@mehm8128
Copy link
Contributor

@mehm8128 mehm8128 commented Dec 22, 2025

related to #1141

I implemented jsx_a11y aria_proptypes rule.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Dec 22, 2025
@mehm8128 mehm8128 marked this pull request as ready for review December 22, 2025 07:11
@mehm8128 mehm8128 requested a review from camc314 as a code owner December 22, 2025 07:11
Copilot AI review requested due to automatic review settings December 22, 2025 07:11
@mehm8128 mehm8128 force-pushed the feat/aria-proptypes branch 2 times, most recently from bf6cbf0 to 001bb64 Compare December 22, 2025 07:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the aria-proptypes lint rule from the jsx-a11y plugin to validate ARIA state and property values in JSX elements. The rule ensures that ARIA attributes use valid values according to the WAI-ARIA specification.

Key Changes

  • Added validation for all ARIA property types including boolean, tristate, string, integer, number, token, and token list
  • Implemented comprehensive test coverage with 135+ test cases covering valid and invalid patterns
  • Acknowledged limitation: non-literal expressions like {!true} are not validated to avoid false positives

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
crates/oxc_linter/src/rules/jsx_a11y/aria_proptypes.rs New rule implementation with validation logic for ARIA property types, diagnostic messages, and comprehensive test suite
crates/oxc_linter/src/rules.rs Module registration for the new aria_proptypes rule
crates/oxc_linter/src/generated/rule_runner_impls.rs Generated rule runner implementation for the new rule
crates/oxc_linter/src/snapshots/jsx_a11y_aria_proptypes.snap.new Test snapshot file containing expected diagnostic output for failing test cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mehm8128 mehm8128 marked this pull request as draft December 22, 2025 07:34
@mehm8128 mehm8128 force-pushed the feat/aria-proptypes branch from 001bb64 to 61f620d Compare December 22, 2025 07:45
@mehm8128 mehm8128 marked this pull request as ready for review December 22, 2025 07:46
@camc314 camc314 changed the title feat(linter): implement aria_proptypes lint rule feat(linter): implement aria/proptypes Dec 22, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 22, 2025

CodSpeed Performance Report

Merging #17253 will not alter performance

Comparing mehm8128:feat/aria-proptypes (0cedb9a) with main (79b83b0)

Summary

✅ 4 untouched
⏩ 41 skipped1

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mehm8128 mehm8128 force-pushed the feat/aria-proptypes branch from 6af73ab to 4f7c482 Compare December 22, 2025 16:20
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@camc314
Copy link
Contributor

camc314 commented Dec 22, 2025

ugh i broke the tests - ill fix them

@github-actions github-actions bot added the A-cli Area - CLI label Dec 22, 2025
@camc314 camc314 removed the A-cli Area - CLI label Dec 22, 2025
@camc314 camc314 self-assigned this Dec 22, 2025
@github-actions github-actions bot added the A-cli Area - CLI label Dec 22, 2025
@camc314 camc314 merged commit b97101a into oxc-project:main Dec 22, 2025
21 checks passed
@mehm8128 mehm8128 deleted the feat/aria-proptypes branch December 23, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants