-
Notifications
You must be signed in to change notification settings - Fork 46
Accessibility added for few pages #3066
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
base: console
Are you sure you want to change the base?
Changes from all commits
2f3de4a
50f8095
3b05dec
61b89f6
12f9cef
e9146e2
718c28e
4ab90c3
6dd713a
2ce5748
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -40,12 +40,12 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| output: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| filename: "[name].[contenthash:8].bundle.js", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chunkFilename: "[name].[contenthash:8].chunk.js", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: path.resolve(__dirname, "build"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clean: true, // Clean the output directory before emit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chunkFilename: "[name].[contenthash:8].chunk.js", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| path: path.resolve(__dirname, "build"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clean: true, // Clean the output directory before emit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| publicPath: "/workbench-ui/", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| optimization: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| optimization: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| splitChunks: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| chunks: "all", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minSize: 20000, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -102,7 +102,7 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| new HtmlWebpackPlugin({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| inject: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| template: "public/index.html", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| templateParameters:isProduction?{}: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| templateParameters: isProduction ? {} : { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| REACT_APP_GLOBAL: envFile.REACT_APP_GLOBAL, // <-- Inject env into HTML | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -111,7 +111,7 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modules: [path.resolve(__dirname, "src"), "node_modules"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extensions: [".js", ".jsx", ".ts", ".tsx"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| preferRelative: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alias: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| alias: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Fix case sensitivity issues with React | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "React": path.resolve(__dirname, "../node_modules/react"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "react": path.resolve(__dirname, "../node_modules/react"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -123,12 +123,17 @@ module.exports = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| devServer: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static: path.join(__dirname, "dist"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| static: path.join(__dirname, "build"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| compress: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| port: 3000, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hot: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| historyApiFallback: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| watchFiles:isProduction?undefined: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| historyApiFallback: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| index: '/workbench-ui/index.html', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rewrites: [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { from: /^\/workbench-ui/, to: '/workbench-ui/index.html' } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| watchFiles: isProduction ? undefined : { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: ["**/*"], // watch all project files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+126
to
137
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) SPA routing base path: add dot-rule exception Deep links containing dots (e.g., /workbench-ui/some.route) may 404. Add disableDotRule: true for robust fallbacks. - historyApiFallback: {
+ historyApiFallback: {
+ disableDotRule: true,
index: '/workbench-ui/index.html',
rewrites: [
{ from: /^\/workbench-ui/, to: '/workbench-ui/index.html' }
]
},📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ignored: path.resolve(__dirname, "node_modules"), // skip same-level node_modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -137,6 +137,11 @@ const CampaignHome = () => { | |||||||||||||||||||||||||||||||||||||||
| <p className="name-description">{t(`HCM_CREATE_CAMPAIGN_DESCRIPTION`)}</p> | ||||||||||||||||||||||||||||||||||||||||
| <div className={"containerStyle"}> | ||||||||||||||||||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||||||||||||||||||
| tabIndex={0} | ||||||||||||||||||||||||||||||||||||||||
| onKeyDown={(e) => { | ||||||||||||||||||||||||||||||||||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||||||||||||||||||||||||||||||||||
| setShowPopUp(true); | ||||||||||||||||||||||||||||||||||||||||
| }}} | ||||||||||||||||||||||||||||||||||||||||
| className={"cardStyle"} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+140
to
145
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix extra brace and make the card fully accessible
Apply: - <div
- tabIndex={0}
- onKeyDown={(e) => {
- if (e.key === "Enter" || e.key === " ") {
- setShowPopUp(true);
- }}}
- className={"cardStyle"}
- onClick={() => {
- setShowPopUp(true);
- }}
- >
+ <div
+ role="button"
+ tabIndex={0}
+ className={"cardStyle"}
+ onClick={() => setShowPopUp(true)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ setShowPopUp(true);
+ }
+ }}
+ aria-label={t("HCM_CREATE_NEW_CAMPAIGN")}
+ >📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (2.1.2)[error] 140-140: The HTML element div is non-interactive. Do not use tabIndex. Adding non-interactive elements to the keyboard navigation flow can confuse users. (lint/a11y/noNoninteractiveTabindex) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| onClick={() => { | ||||||||||||||||||||||||||||||||||||||||
| setShowPopUp(true); | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.