From 8ab6f623e092b55da2c5aa7a991436e1cfa2ca2e Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 26 Sep 2024 22:09:52 -0400 Subject: [PATCH 1/2] A11y: Improve test runner recipe --- docs/_snippets/test-runner-a11y-configure.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/_snippets/test-runner-a11y-configure.md b/docs/_snippets/test-runner-a11y-configure.md index 1218954e8f91..cae622a42136 100644 --- a/docs/_snippets/test-runner-a11y-configure.md +++ b/docs/_snippets/test-runner-a11y-configure.md @@ -20,7 +20,8 @@ module.exports = { rules: storyContext.parameters?.a11y?.config?.rules, }); - await checkA11y(page, '#storybook-root', { + const element = storyContext.parameters?.a11y?.element ?? '#storybook-root'; + await checkA11y(page, element, { detailedReport: true, detailedReportOptions: { html: true, @@ -53,7 +54,8 @@ const config: TestRunnerConfig = { rules: storyContext.parameters?.a11y?.config?.rules, }); - await checkA11y(page, '#storybook-root', { + const element = storyContext.parameters?.a11y?.element ?? '#storybook-root'; + await checkA11y(page, element, { detailedReport: true, detailedReportOptions: { html: true, @@ -64,4 +66,3 @@ const config: TestRunnerConfig = { export default config; ``` - From e891f0c10e5e7d2b472b7995f41908a48b1bb783 Mon Sep 17 00:00:00 2001 From: JavanPoirier <42590458+JavanPoirier@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:31:11 -0400 Subject: [PATCH 2/2] Fix viteFinal link --- docs/get-started/frameworks/nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/get-started/frameworks/nextjs.mdx b/docs/get-started/frameworks/nextjs.mdx index 597522f03020..14e2c3e55294 100644 --- a/docs/get-started/frameworks/nextjs.mdx +++ b/docs/get-started/frameworks/nextjs.mdx @@ -107,7 +107,7 @@ Storybook for Next.js is a [framework](../../contribute/framework.mdx) that make {/* prettier-ignore-end */} - If your Storybook configuration contains custom Webpack operations in [`webpackFinal`](../../api/main-config/main-config-webpack-final.mdx), you will likely need to create equivalents in [`viteFinal`]((../../api/main-config/main-config-vite-final.mdx)). + If your Storybook configuration contains custom Webpack operations in [`webpackFinal`](../../api/main-config/main-config-webpack-final.mdx), you will likely need to create equivalents in [`viteFinal`](../../api/main-config/main-config-vite-final.mdx). Finally, if you were using Storybook plugins to integrate with Next.js, those are no longer necessary when using this framework and can be removed: