diff --git a/package-lock.json b/package-lock.json index d7db1c44..d52fe514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@babel/eslint-parser": "^7.25.7", "@babel/plugin-syntax-import-assertions": "^7.25.7", "@chromatic-com/storybook": "^1.3.1", + "@double-great/stylelint-a11y": "^3.0.2", "@eslint/js": "^9.11.1", "@eslint/json": "^0.5.0", "@eslint/markdown": "^6.2.0", @@ -49,7 +50,7 @@ "rimraf": "^5.0.5", "storybook": "^8.0.6", "storybook-addon-fetch-mock": "^2.0.1", - "stylelint": "^16.4.0", + "stylelint": "^16.10.0", "stylelint-config-recommended": "^14.0.1", "vite": "^5.2.8" }, @@ -1983,7 +1984,9 @@ } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "2.6.1", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.2.tgz", + "integrity": "sha512-6tC/MnlEvs5suR4Ahef4YlBccJDHZuxGsAlxXmybWjZ5jPxlzLSMlRZ9mVHSRvlD+CmtE7+hJ+UQbfXrws/rUQ==", "dev": true, "funding": [ { @@ -1995,16 +1998,17 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", "engines": { - "node": "^14 || ^16 || >=18" + "node": ">=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^2.2.4" + "@csstools/css-tokenizer": "^3.0.2" } }, "node_modules/@csstools/css-tokenizer": { - "version": "2.2.4", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.2.tgz", + "integrity": "sha512-IuTRcD53WHsXPCZ6W7ubfGqReTJ9Ra0yRRFmXYP/Re8hFYYfoIYIK4080X5luslVLWimhIeFq0hj09urVMQzTw==", "dev": true, "funding": [ { @@ -2016,13 +2020,14 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", "engines": { - "node": "^14 || ^16 || >=18" + "node": ">=18" } }, "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.9", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", "dev": true, "funding": [ { @@ -2034,17 +2039,18 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT", "engines": { - "node": "^14 || ^16 || >=18" + "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.6.1", - "@csstools/css-tokenizer": "^2.2.4" + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1" } }, "node_modules/@csstools/selector-specificity": { - "version": "3.0.3", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-4.0.0.tgz", + "integrity": "sha512-189nelqtPd8++phaHNwYovKZI0FOzH1vQEE3QhHHkNIGrg5fSs9CbYP3RvfEH5geztnIA9Jwq91wyOIwAW5JIQ==", "dev": true, "funding": [ { @@ -2056,12 +2062,11 @@ "url": "https://opencollective.com/csstools" } ], - "license": "MIT-0", "engines": { - "node": "^14 || ^16 || >=18" + "node": ">=18" }, "peerDependencies": { - "postcss-selector-parser": "^6.0.13" + "postcss-selector-parser": "^6.1.0" } }, "node_modules/@discoveryjs/json-ext": { @@ -2072,10 +2077,26 @@ "node": ">=10.0.0" } }, + "node_modules/@double-great/stylelint-a11y": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@double-great/stylelint-a11y/-/stylelint-a11y-3.0.2.tgz", + "integrity": "sha512-HPYUwHtn03cO7og4/hhBGyAJ8eF45HI20QQkIAWyiMPW68rigzltOiS98iBONznKXNwoSvMjlIX0q7JJeJnkDg==", + "dev": true, + "dependencies": { + "postcss": "^8.4.33" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "stylelint": ">=16.0.0" + } + }, "node_modules/@dual-bundle/import-meta-resolve": { - "version": "4.0.0", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==", "dev": true, - "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -6131,11 +6152,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, - "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -7214,9 +7236,10 @@ } }, "node_modules/css-functions-list": { - "version": "3.2.2", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz", + "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12 || >=16" } @@ -7240,8 +7263,9 @@ }, "node_modules/cssesc": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, - "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -8569,9 +8593,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -10832,9 +10857,10 @@ } }, "node_modules/known-css-properties": { - "version": "0.30.0", - "dev": true, - "license": "MIT" + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", + "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", + "dev": true }, "node_modules/koa": { "version": "2.14.2", @@ -13977,9 +14003,10 @@ "license": "MIT" }, "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -14090,7 +14117,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -14106,23 +14135,25 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-resolve-nested-selector": { - "version": "0.1.1", - "dev": true, - "license": "MIT" + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz", + "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==", + "dev": true }, "node_modules/postcss-safe-parser": { - "version": "7.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", + "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", "dev": true, "funding": [ { @@ -14138,7 +14169,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "engines": { "node": ">=18.0" }, @@ -14147,9 +14177,10 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.16", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, - "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -15626,9 +15657,10 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -15940,46 +15972,56 @@ } }, "node_modules/stylelint": { - "version": "16.4.0", + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.10.0.tgz", + "integrity": "sha512-z/8X2rZ52dt2c0stVwI9QL2AFJhLhbPkyfpDFcizs200V/g7v+UYY6SNcB9hKOLcDDX/yGLDsY/pX08sLkz9xQ==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + }, + { + "type": "github", + "url": "https://github.com/sponsors/stylelint" + } + ], "dependencies": { - "@csstools/css-parser-algorithms": "^2.6.1", - "@csstools/css-tokenizer": "^2.2.4", - "@csstools/media-query-list-parser": "^2.1.9", - "@csstools/selector-specificity": "^3.0.3", - "@dual-bundle/import-meta-resolve": "^4.0.0", + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "@csstools/selector-specificity": "^4.0.0", + "@dual-bundle/import-meta-resolve": "^4.1.0", "balanced-match": "^2.0.0", "colord": "^2.9.3", "cosmiconfig": "^9.0.0", - "css-functions-list": "^3.2.2", - "css-tree": "^2.3.1", - "debug": "^4.3.4", + "css-functions-list": "^3.2.3", + "css-tree": "^3.0.0", + "debug": "^4.3.7", "fast-glob": "^3.3.2", "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^8.0.0", + "file-entry-cache": "^9.1.0", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^5.3.1", + "ignore": "^6.0.2", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.30.0", + "known-css-properties": "^0.34.0", "mathml-tag-names": "^2.1.3", "meow": "^13.2.0", - "micromatch": "^4.0.5", + "micromatch": "^4.0.8", "normalize-path": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.38", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^7.0.0", - "postcss-selector-parser": "^6.0.16", + "picocolors": "^1.0.1", + "postcss": "^8.4.47", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-safe-parser": "^7.0.1", + "postcss-selector-parser": "^6.1.2", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "string-width": "^4.2.3", - "strip-ansi": "^7.1.0", - "supports-hyperlinks": "^3.0.0", + "supports-hyperlinks": "^3.1.0", "svg-tags": "^1.0.0", "table": "^6.8.2", "write-file-atomic": "^5.0.1" @@ -15989,10 +16031,6 @@ }, "engines": { "node": ">=18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" } }, "node_modules/stylelint-config-recommended": { @@ -16030,11 +16068,75 @@ "dev": true, "license": "MIT" }, + "node_modules/stylelint/node_modules/css-tree": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.0.0.tgz", + "integrity": "sha512-o88DVQ6GzsABn1+6+zo2ct801dBO5OASVyxbbvA2W20ue2puSh/VOuqUj90eUeMSX/xqGqBmOKiRQN7tJOuBXw==", + "dev": true, + "dependencies": { + "mdn-data": "2.10.0", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/stylelint/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/stylelint/node_modules/emoji-regex": { "version": "8.0.0", "dev": true, "license": "MIT" }, + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz", + "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==", + "dev": true, + "dependencies": { + "flat-cache": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/flat-cache": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz", + "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==", + "dev": true, + "dependencies": { + "flatted": "^3.3.1", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/stylelint/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/stylelint/node_modules/is-plain-object": { "version": "5.0.0", "dev": true, @@ -16043,6 +16145,31 @@ "node": ">=0.10.0" } }, + "node_modules/stylelint/node_modules/mdn-data": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.10.0.tgz", + "integrity": "sha512-qq7C3EtK3yJXMwz1zAab65pjl+UhohqMOctTgcqjLOWABqmwj+me02LSsCuEUxnst9X1lCBpoE0WArGKgdGDzw==", + "dev": true + }, + "node_modules/stylelint/node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/stylelint/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "node_modules/stylelint/node_modules/string-width": { "version": "4.2.3", "dev": true, @@ -16187,29 +16314,35 @@ } }, "node_modules/supports-hyperlinks": { - "version": "3.0.0", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz", + "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" }, "engines": { "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-hyperlinks/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/supports-hyperlinks/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -16577,8 +16710,9 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -16588,8 +16722,9 @@ }, "node_modules/to-regex-range/node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } diff --git a/package.json b/package.json index a18a2c0f..cb6354aa 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@babel/eslint-parser": "^7.25.7", "@babel/plugin-syntax-import-assertions": "^7.25.7", "@chromatic-com/storybook": "^1.3.1", + "@double-great/stylelint-a11y": "^3.0.2", "@eslint/js": "^9.11.1", "@eslint/json": "^0.5.0", "@eslint/markdown": "^6.2.0", @@ -73,7 +74,7 @@ "rimraf": "^5.0.5", "storybook": "^8.0.6", "storybook-addon-fetch-mock": "^2.0.1", - "stylelint": "^16.4.0", + "stylelint": "^16.10.0", "stylelint-config-recommended": "^14.0.1", "vite": "^5.2.8" }, diff --git a/src/components/blog-posts-list/blog-posts-list.module.css b/src/components/blog-posts-list/blog-posts-list.module.css index c91785d1..172af8b0 100644 --- a/src/components/blog-posts-list/blog-posts-list.module.css +++ b/src/components/blog-posts-list/blog-posts-list.module.css @@ -20,7 +20,8 @@ text-decoration: none; } -.postsListItemContentLink:hover { +.postsListItemContentLink:hover, +.postsListItemContentLink:focus { text-decoration: none; } diff --git a/src/components/capabilities/capabilities.css b/src/components/capabilities/capabilities.css index e2a0feb9..de016504 100644 --- a/src/components/capabilities/capabilities.css +++ b/src/components/capabilities/capabilities.css @@ -25,12 +25,14 @@ stroke: var(--color-gray); } -.section:hover { +.section:hover, +.section:focus { border: 2px dotted var(--color-accent); } .active strong, -.section:hover strong { +.section:hover strong, +.section:focus strong { font-family: var(--font-primary-bold); color: var(--color-white); } @@ -117,7 +119,8 @@ pre { margin-right: var(--size-px-4); } - .section:hover { + .section:hover, + .section:focus { padding: var(--size-px-2); } } diff --git a/src/components/get-started/get-started.module.css b/src/components/get-started/get-started.module.css index 2c9bf2c6..5761a919 100644 --- a/src/components/get-started/get-started.module.css +++ b/src/components/get-started/get-started.module.css @@ -62,13 +62,15 @@ text-decoration: none; } -.buttonBlitz:hover { +.buttonBlitz:hover, +.buttonBlitz:focus { background-color: var(--color-gray); text-decoration: none; color: var(--color-black) !important; } -.buttonStarted:hover { +.buttonStarted:hover, +.buttonStarted:focus { background-color: var(--color-accent); text-decoration: none; color: var(--color-black) !important; diff --git a/src/components/header/header.module.css b/src/components/header/header.module.css index b573e7e9..917a3893 100644 --- a/src/components/header/header.module.css +++ b/src/components/header/header.module.css @@ -50,7 +50,8 @@ text-decoration: none; } -.navBarMenuItem a:hover { +.navBarMenuItem a:hover, +.navBarMenuItem a:focus { text-decoration: underline; } diff --git a/src/components/hero-banner/hero-banner.module.css b/src/components/hero-banner/hero-banner.module.css index 805946d8..1593f10d 100644 --- a/src/components/hero-banner/hero-banner.module.css +++ b/src/components/hero-banner/hero-banner.module.css @@ -56,13 +56,15 @@ text-decoration: none; } -.buttonBlitz:hover { +.buttonBlitz:hover, +.buttonBlitz:focus { background-color: var(--color-secondary); color: var(--color-white) !important; text-decoration: none; } -.buttonStarted:hover { +.buttonStarted:hover, +.buttonStarted:focus { background-color: var(--color-accent); text-decoration: none; color: var(--color-black) !important; diff --git a/src/components/run-anywhere/run-anywhere.module.css b/src/components/run-anywhere/run-anywhere.module.css index 28a890df..6e7bbfde 100644 --- a/src/components/run-anywhere/run-anywhere.module.css +++ b/src/components/run-anywhere/run-anywhere.module.css @@ -61,7 +61,8 @@ color: var(--color-white); } -.platformBox a:hover { +.platformBox a:hover, +.platformBox a:focus { color: var(--color-black); background-color: var(--color-white); text-decoration: none; diff --git a/src/components/side-nav/side-nav.module.css b/src/components/side-nav/side-nav.module.css index 64a1ce5c..77b2c513 100644 --- a/src/components/side-nav/side-nav.module.css +++ b/src/components/side-nav/side-nav.module.css @@ -28,9 +28,11 @@ box-shadow: var(--shadow-3); color: var(--color-black); - & #indicator { - display: inline-block; - transition: transform 1s ease; + @media (prefers-reduced-motion: no-preference) { + & #indicator { + display: inline-block; + transition: transform 1s ease; + } } } @@ -71,7 +73,8 @@ } & a.active, - & a:hover { + & a:hover, + & a:focus { text-decoration: underline; opacity: 0.7; } @@ -85,7 +88,8 @@ list-style: none; margin: 0 0 var(--size-6) 0; - & a:hover { + & a:hover, + & a:focus { opacity: 0.7; } } diff --git a/src/components/table-of-contents/table-of-contents.module.css b/src/components/table-of-contents/table-of-contents.module.css index 05209b2c..68c9a560 100644 --- a/src/components/table-of-contents/table-of-contents.module.css +++ b/src/components/table-of-contents/table-of-contents.module.css @@ -38,9 +38,11 @@ border-radius: var(--radius-2); box-shadow: var(--shadow-3); - & #indicator { - display: inline-block; - transition: transform 1s ease; + @media (prefers-reduced-motion: no-preference) { + & #indicator { + display: inline-block; + transition: transform 1s ease; + } } } @@ -89,7 +91,8 @@ font-size: var(--font-size-1); } - & a:hover { + & a:hover, + & a:focus { opacity: 0.7; } } diff --git a/src/styles/theme.css b/src/styles/theme.css index 747ba914..fd5e4d8e 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -55,7 +55,8 @@ a:visited { color: var(--color-primary); } -a:hover { +a:hover, +a:focus { text-decoration: underline; background-color: transparent; } @@ -120,8 +121,11 @@ h4 > a > span.icon { } h2:hover > a > span.icon, +h2:focus > a > span.icon, h3:hover > a > span.icon, -h4:hover > a > span.icon { +h3:focus > a > span.icon, +h4:hover > a > span.icon, +h4:focus > a > span.icon { opacity: 1; } diff --git a/stylelint.config.js b/stylelint.config.js index 43d61cf2..7aaa9847 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,3 +1,9 @@ export default { extends: ["stylelint-config-recommended"], + plugins: ["@double-great/stylelint-a11y"], // -> no `extends` https://github.com/double-great/stylelint-a11y/issues/65 + rules: { + "a11y/media-prefers-reduced-motion": true, + "a11y/no-outline-none": true, + "a11y/selector-pseudo-class-focus": true, + }, };