Skip to content
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 a11y configuration for eslint and storybook #1849

Merged
merged 15 commits into from
Mar 23, 2021
Merged

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Feb 24, 2021

This PR follows up on the discussion around #1793, adding eslint and and storybook a11y tooling at the framework level that can be turned off with a toml var (all of it's on by default).

  • what should the name of the toml var be?
    • enableA11yTooling, a11yTooling... just a11y?
      • if we end up adding skip links at the framework level, it might even make sense to add a table, [a11y], and then list all the vars there with more descriptive names
  • actually test this stuff once I get the hang of the new contributing workflow (and maybe PR a fix for symlinking packages/core)
    • some of the jsx-a11y rules might need to be turned off, just not sure which ones yet
  • revert prisma being added to packages/core it was just moved, not added; it's consistent with what's in main

@jtoar jtoar self-assigned this Feb 24, 2021
packages/core/package.json Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 24, 2021

📦 PR Packages

Click to Show Package Download Links

https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/create-redwood-app-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-api-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-api-server-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-auth-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-cli-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-core-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-dev-server-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-eslint-config-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-eslint-plugin-redwood-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-forms-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-internal-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-prerender-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-router-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-structure-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-testing-0.27.1-487c6ab.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1849/redwoodjs-web-0.27.1-487c6ab.tgz

Install this PR by running yarn rw upgrade --pr 1849:0.27.1-487c6ab

packages/core/config/storybook/main.js Outdated Show resolved Hide resolved
packages/eslint-config/index.js Outdated Show resolved Hide resolved
@jtoar
Copy link
Contributor Author

jtoar commented Feb 24, 2021

@peterp turns out eslint-plugin-jsx-a11y has been in the framework since PR #6—it just wasn't enabled!

@jtoar jtoar mentioned this pull request Feb 24, 2021
6 tasks
@jtoar
Copy link
Contributor Author

jtoar commented Mar 15, 2021

Picked this up again today; the storybook command still works (and the add on too), but there's this long error message about something being broken in axe-core: https://s.tape.sh/bCLk58nV

@jtoar
Copy link
Contributor Author

jtoar commented Mar 15, 2021

Looks like we can resolve this error by upgrading to storybook 6 (see storybookjs/storybook#14160). We're on:

"@storybook/react": "^5.3.19",

Dependabot recently tried to get us to upgrade; the CI passed: #1926.

@jtoar
Copy link
Contributor Author

jtoar commented Mar 15, 2021

If this gets merged, it would render the work here (integrating the a11y addon) moot: storybookjs/storybook#12485. Not sure when or if it will though, so it's still worth doing this.

@thedavidprice thedavidprice modified the milestone: next release Mar 17, 2021
@thedavidprice
Copy link
Contributor

We need to upgrade Storybook to v6 for this. Dependabot tried to and it passed our CI: #1926

^^ @jtoar there are more steps to this than upgrading the package. This is on @peterp's radar — perhaps you should connect with him and bump priority.

Also related to #1667 (Storybook has since upgraded to Webpack v5)

@cypress
Copy link

cypress bot commented Mar 22, 2021



Test summary

11 0 1 0Flakiness 0


Run details

Project RedwoodJS Framework
Status Passed
Commit 8176c93 ℹ️
Started Mar 23, 2021 4:03 PM
Ended Mar 23, 2021 4:06 PM
Duration 02:48 💡
OS Linux Ubuntu - 20.04
Browser Chrome 89

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

@jtoar jtoar marked this pull request as ready for review March 22, 2021 15:51
@peterp
Copy link
Contributor

peterp commented Mar 22, 2021

Nice! Reviewing this now!

@thedavidprice
Copy link
Contributor

@jtoar surprise! Storybook now upgraded to v6 as of #2054 🚀

@jtoar jtoar merged commit c7c8455 into main Mar 23, 2021
@thedavidprice thedavidprice added this to the next release milestone Mar 23, 2021
@thedavidprice thedavidprice deleted the ds-framework-a11y-config branch March 23, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/a11y topic/config Babel, Webpack, ESLint, Prettier, etc. topic/storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants