-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new setup command for a11y #1793
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 21, 2021
jtoar
force-pushed
the
ds-setup-a11y-eslint
branch
from
April 18, 2021 19:54
c57d8ec
to
2c160cb
Compare
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Closing this out for the time being; needs more design time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since a lot of this is moving into core, what this'll actually setup is @axe-core/react and maybe jest-axe. It could still do a lot more, it just wont' do most of what's below anymore; that's what #1849 is for.
This PR adds a new setup command,
a11y
, that equips a Redwood project with accessibility tooling like eslint-plugin-jsx-a11y. To start, the only thing it'll setup is eslint-plugin-jsx-a11y, a "static AST checker for a11y rules on JSX elements", but there's plenty room for more.We want to make it easy to make accessible websites with Redwood. While the majority of that work will be done in the router, just because we manage focus/announcements/scroll doesn't mean your website's accessible—the modals, listboxes, switches, and pretty much anything interactive need to be as well, especially if they're built from scratch with React.
Since we don't want to constrain anyone to a particular UI library we know to be accessible (though we'll certainly recommend one), we need to make sure we provide the tooling you need to make making accessible websites more tractable. This setups up that tooling.
The prior art here is Gatsby https://www.gatsbyjs.com/docs/conceptual/making-your-site-accessible/#linting-with-eslint-plugin-jsx-a11y.
Questions:
--set-to-error
or something, to setup the rules as errors from the get-goweb/.eslintrc.js
,web/package.json
, or somewhere less visible?@redwoodjs/eslint-config
preset's configured in the rootpackage.json
. but since this might not be a one-liner the way that one is, it might be better off in it's own file