From 743c33bc17c0d861c0126e23ea6081446c09a8d7 Mon Sep 17 00:00:00 2001 From: tubone24 Date: Sun, 24 Apr 2022 19:48:40 +0900 Subject: [PATCH 1/3] a11y emptylink --- package-lock.json | 39 +++++++++++++++++++------------ src/__generated__/gatsby-types.ts | 16 ++++++------- src/components/Card/index.scss | 8 +++++++ src/components/Card/index.tsx | 2 ++ 4 files changed, 42 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 131d256c07..b2ac052fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,14 +101,14 @@ "cypress": "9.3.1", "cypress-visual-regression": "1.7.0", "eslint": "8.13.0", - "eslint-config-airbnb": "19.0.0", + "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "8.3.0", "eslint-import-resolver-webpack": "0.13.2", "eslint-plugin-import": "2.25.3", "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-prettier": "4.0.0", "eslint-plugin-react": "7.29.4", - "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.26", + "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.27", "gh-pages": "3.2.3", "husky": "7.0.4", "lint-staged": "12.3.8", @@ -1910,8 +1910,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.16.7", - "license": "MIT", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz", + "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -8549,9 +8550,10 @@ } }, "node_modules/eslint-config-airbnb": { - "version": "19.0.0", + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, - "license": "MIT", "dependencies": { "eslint-config-airbnb-base": "^15.0.0", "object.assign": "^4.1.2", @@ -8564,7 +8566,7 @@ "eslint": "^7.32.0 || ^8.2.0", "eslint-plugin-import": "^2.25.3", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.27.0", + "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0" } }, @@ -11810,11 +11812,12 @@ } }, "node_modules/gatsby-plugin-webpack-bundle-analyser-v2": { - "version": "1.1.26", + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/gatsby-plugin-webpack-bundle-analyser-v2/-/gatsby-plugin-webpack-bundle-analyser-v2-1.1.27.tgz", + "integrity": "sha512-GjX4zU70TOvu3OhpKG8JD/GGfr8tCxjwJKKfRu3WZQTkjIEIGkodxcsdOIbuSHov83hQhlLQBZj037mkCrjrfQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/runtime": "^7.16.3", + "@babel/runtime": "^7.17.8", "webpack-bundle-analyzer": "^4.5.0" }, "peerDependencies": { @@ -52760,7 +52763,9 @@ } }, "@babel/runtime": { - "version": "7.16.7", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz", + "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -57521,7 +57526,9 @@ } }, "eslint-config-airbnb": { - "version": "19.0.0", + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "requires": { "eslint-config-airbnb-base": "^15.0.0", @@ -60205,10 +60212,12 @@ } }, "gatsby-plugin-webpack-bundle-analyser-v2": { - "version": "1.1.26", + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/gatsby-plugin-webpack-bundle-analyser-v2/-/gatsby-plugin-webpack-bundle-analyser-v2-1.1.27.tgz", + "integrity": "sha512-GjX4zU70TOvu3OhpKG8JD/GGfr8tCxjwJKKfRu3WZQTkjIEIGkodxcsdOIbuSHov83hQhlLQBZj037mkCrjrfQ==", "dev": true, "requires": { - "@babel/runtime": "^7.16.3", + "@babel/runtime": "^7.17.8", "webpack-bundle-analyzer": "^4.5.0" } }, @@ -86629,7 +86638,7 @@ "textlint-rule-no-hoso-kinshi-yogo": { "version": "git+ssh://git@github.com/tubone24/textlint-rule-no-hoso-kinshi-yogo.git#316dd620fec74fd615c76007c9d7b9bcd2a7b8e2", "dev": true, - "from": "textlint-rule-no-hoso-kinshi-yogo@git+https://github.com/tubone24/textlint-rule-no-hoso-kinshi-yogo.git", + "from": "textlint-rule-no-hoso-kinshi-yogo@github:tubone24/textlint-rule-no-hoso-kinshi-yogo", "requires": { "fast-xml-parser": "github:Delagen/fast-xml-parser", "isomorphic-fetch": "^3.0.0", diff --git a/src/__generated__/gatsby-types.ts b/src/__generated__/gatsby-types.ts index 6dfb8b5a89..9f6902680b 100644 --- a/src/__generated__/gatsby-types.ts +++ b/src/__generated__/gatsby-types.ts @@ -2781,6 +2781,14 @@ type getAllTagsQueryVariables = Exact<{ [key: string]: never; }>; type getAllTagsQuery = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } }; +type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; + + +type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( + Pick + & { readonly frontmatter: Maybe>, readonly fields: Maybe> } + ) }> } }; + type cardDataFragment = { readonly fields: Maybe>, readonly frontmatter: Maybe<( Pick & { url: MarkdownRemarkFrontmatter['slug'] } @@ -2794,12 +2802,4 @@ type SidebarQueryQuery = { readonly all: ( & { readonly allPosts: ReadonlyArray<{ readonly node: { readonly frontmatter: Maybe> } }> } ), readonly limited: { readonly latestPosts: ReadonlyArray<{ readonly node: cardDataFragment }> } }; -type Unnamed_1_QueryVariables = Exact<{ [key: string]: never; }>; - - -type Unnamed_1_Query = { readonly allMarkdownRemark: { readonly edges: ReadonlyArray<{ readonly node: ( - Pick - & { readonly frontmatter: Maybe>, readonly fields: Maybe> } - ) }> } }; - } \ No newline at end of file diff --git a/src/components/Card/index.scss b/src/components/Card/index.scss index 5ef68739f5..fd04c3580f 100644 --- a/src/components/Card/index.scss +++ b/src/components/Card/index.scss @@ -100,4 +100,12 @@ color: $black; } } + .visually-hidden { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + clip: rect(1px, 1px, 1px, 1px); + } } diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 760e65cbdf..1ec859fcef 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -21,6 +21,7 @@ const CardHeader = ({ if (index > 1) { return ( + {title}
+ {title}
Date: Sun, 24 Apr 2022 19:53:33 +0900 Subject: [PATCH 2/3] readme --- src/components/Card/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 1ec859fcef..335bf73b1e 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -26,6 +26,7 @@ const CardHeader = ({ className="wrapper lozad" data-background-image={parseImgur(image, SizeMapping.large)} title={title} + aria-hidden="true" /> ); @@ -39,6 +40,7 @@ const CardHeader = ({ backgroundImage: ` url(${parseImgur(image, SizeMapping.large)})`, }} title={title} + aria-hidden="true" /> ); From f4dfefb227231338095d53021c20120acb4ad909 Mon Sep 17 00:00:00 2001 From: tubone24 Date: Sun, 24 Apr 2022 20:11:02 +0900 Subject: [PATCH 3/3] contrast --- src/components/Card/index.tsx | 4 +++- src/templates/index.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Card/index.tsx b/src/components/Card/index.tsx index 335bf73b1e..941959d274 100644 --- a/src/components/Card/index.tsx +++ b/src/components/Card/index.tsx @@ -85,7 +85,9 @@ const Card = ({

{title}

{description}

- ....Read more.... + + ....Read more.... +
diff --git a/src/templates/index.tsx b/src/templates/index.tsx index 459d2c0548..368973b1d1 100644 --- a/src/templates/index.tsx +++ b/src/templates/index.tsx @@ -36,8 +36,8 @@ const NavLink = ({ } return ( - - + + ); };