From a2047cb37c2367c96021c7d89b58ab7be163b1be Mon Sep 17 00:00:00 2001 From: Hiroaki KARASAWA Date: Fri, 14 Jun 2019 15:25:33 +0900 Subject: [PATCH 1/3] style(runtime): set aria-hidden to true to the splite for the accessibility reason The sprite is inserted immediately below the body element, but all elements immediately below the body must be either landmarks or insivible for the blind users. Please see this document for the detail. https://dequeuniversity.com/rules/axe/3.2/region?application=axeAPI --- runtime/browser-sprite.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/browser-sprite.js b/runtime/browser-sprite.js index f65870c..d442bee 100644 --- a/runtime/browser-sprite.js +++ b/runtime/browser-sprite.js @@ -11,7 +11,12 @@ let sprite; if (isSpriteExists) { sprite = window[spriteGlobalVarName]; } else { - sprite = new BrowserSprite({ attrs: { id: spriteNodeId } }); + sprite = new BrowserSprite({ + attrs: { + id: spriteNodeId, + 'aria-hidden': 'true' + } + }); window[spriteGlobalVarName] = sprite; } From 97a5a50f753c506fc1d52f21f0f75d1a36f9b45e Mon Sep 17 00:00:00 2001 From: Stanislav Germanovskii Date: Sat, 5 Dec 2020 12:20:56 +0300 Subject: [PATCH 2/3] chore(release): 5.1.0 --- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab521a3..1ddfc50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [5.1.0](https://github.com/JetBrains/svg-sprite-loader/compare/v5.0.0...v5.1.0) (2020-12-05) + + +### Features + +* add support for webpack5 ([b34b2b2](https://github.com/JetBrains/svg-sprite-loader/commit/b34b2b2)) +* nodejs update ([00f4fc2](https://github.com/JetBrains/svg-sprite-loader/commit/00f4fc2)) + + + # [5.0.0](https://github.com/JetBrains/svg-sprite-loader/compare/v4.3.0...v5.0.0) (2020-05-11) diff --git a/package.json b/package.json index 0f06b88..b2029e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svg-sprite-loader", - "version": "5.0.0", + "version": "5.1.0", "description": "Webpack loader for creating SVG sprites", "keywords": [ "svg", From d5ddfef3784fa179a57fd35f2f3ebb3a9064c076 Mon Sep 17 00:00:00 2001 From: Stanislav Germanovskii Date: Sat, 5 Dec 2020 12:21:56 +0300 Subject: [PATCH 3/3] chore(release): 5.1.1 --- CHANGELOG.md | 5 +++++ examples/browser-sprite-with-dll/build/dll.js | 14 ++++++++++---- examples/browser-sprite/build/main.js | 14 ++++++++++---- examples/custom-runtime-generator/build/main.js | 14 ++++++++++---- examples/server-side-rendering/build/main.js | 3 ++- package.json | 2 +- 6 files changed, 38 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ddfc50..0b18e93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [5.1.1](https://github.com/JetBrains/svg-sprite-loader/compare/v5.1.0...v5.1.1) (2020-12-05) + + + # [5.1.0](https://github.com/JetBrains/svg-sprite-loader/compare/v5.0.0...v5.1.0) (2020-12-05) diff --git a/examples/browser-sprite-with-dll/build/dll.js b/examples/browser-sprite-with-dll/build/dll.js index 8d35340..b859120 100644 --- a/examples/browser-sprite-with-dll/build/dll.js +++ b/examples/browser-sprite-with-dll/build/dll.js @@ -625,7 +625,8 @@ var xlink$1 = namespaces_1.xlink; var defaultConfig = { attrs: ( obj = { - style: ['position: absolute', 'width: 0', 'height: 0'].join('; ') + style: ['position: absolute', 'width: 0', 'height: 0'].join('; '), + 'aria-hidden': 'true' }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj ) }; var obj; @@ -958,7 +959,7 @@ var locationChangeAngularEmitter = function (eventName) { }]); }; -var defaultSelector = 'linearGradient, radialGradient, pattern'; +var defaultSelector = 'linearGradient, radialGradient, pattern, mask, clipPath'; /** * @param {Element} svg @@ -1180,7 +1181,7 @@ var BrowserSprite = (function (Sprite$$1) { } if (typeof cfg.locationChangeAngularEmitter === 'undefined') { - config.locationChangeAngularEmitter = 'angular' in window; + config.locationChangeAngularEmitter = typeof window.angular !== 'undefined'; } if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') { @@ -1388,7 +1389,12 @@ var sprite; if (isSpriteExists) { sprite = window[spriteGlobalVarName]; } else { - sprite = new BrowserSprite({ attrs: { id: spriteNodeId } }); + sprite = new BrowserSprite({ + attrs: { + id: spriteNodeId, + 'aria-hidden': 'true' + } + }); window[spriteGlobalVarName] = sprite; } diff --git a/examples/browser-sprite/build/main.js b/examples/browser-sprite/build/main.js index 5d8470a..4d94ee4 100644 --- a/examples/browser-sprite/build/main.js +++ b/examples/browser-sprite/build/main.js @@ -612,7 +612,8 @@ var xlink$1 = namespaces_1.xlink; var defaultConfig = { attrs: ( obj = { - style: ['position: absolute', 'width: 0', 'height: 0'].join('; ') + style: ['position: absolute', 'width: 0', 'height: 0'].join('; '), + 'aria-hidden': 'true' }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj ) }; var obj; @@ -945,7 +946,7 @@ var locationChangeAngularEmitter = function (eventName) { }]); }; -var defaultSelector = 'linearGradient, radialGradient, pattern'; +var defaultSelector = 'linearGradient, radialGradient, pattern, mask, clipPath'; /** * @param {Element} svg @@ -1167,7 +1168,7 @@ var BrowserSprite = (function (Sprite$$1) { } if (typeof cfg.locationChangeAngularEmitter === 'undefined') { - config.locationChangeAngularEmitter = 'angular' in window; + config.locationChangeAngularEmitter = typeof window.angular !== 'undefined'; } if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') { @@ -1375,7 +1376,12 @@ var sprite; if (isSpriteExists) { sprite = window[spriteGlobalVarName]; } else { - sprite = new BrowserSprite({ attrs: { id: spriteNodeId } }); + sprite = new BrowserSprite({ + attrs: { + id: spriteNodeId, + 'aria-hidden': 'true' + } + }); window[spriteGlobalVarName] = sprite; } diff --git a/examples/custom-runtime-generator/build/main.js b/examples/custom-runtime-generator/build/main.js index 1c024d2..a4286b4 100644 --- a/examples/custom-runtime-generator/build/main.js +++ b/examples/custom-runtime-generator/build/main.js @@ -9993,7 +9993,8 @@ var xlink$1 = namespaces_1.xlink; var defaultConfig = { attrs: ( obj = { - style: ['position: absolute', 'width: 0', 'height: 0'].join('; ') + style: ['position: absolute', 'width: 0', 'height: 0'].join('; '), + 'aria-hidden': 'true' }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj ) }; var obj; @@ -10326,7 +10327,7 @@ var locationChangeAngularEmitter = function (eventName) { }]); }; -var defaultSelector = 'linearGradient, radialGradient, pattern'; +var defaultSelector = 'linearGradient, radialGradient, pattern, mask, clipPath'; /** * @param {Element} svg @@ -10548,7 +10549,7 @@ var BrowserSprite = (function (Sprite$$1) { } if (typeof cfg.locationChangeAngularEmitter === 'undefined') { - config.locationChangeAngularEmitter = 'angular' in window; + config.locationChangeAngularEmitter = typeof window.angular !== 'undefined'; } if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') { @@ -10756,7 +10757,12 @@ var sprite; if (isSpriteExists) { sprite = window[spriteGlobalVarName]; } else { - sprite = new BrowserSprite({ attrs: { id: spriteNodeId } }); + sprite = new BrowserSprite({ + attrs: { + id: spriteNodeId, + 'aria-hidden': 'true' + } + }); window[spriteGlobalVarName] = sprite; } diff --git a/examples/server-side-rendering/build/main.js b/examples/server-side-rendering/build/main.js index 70342f1..01ae184 100644 --- a/examples/server-side-rendering/build/main.js +++ b/examples/server-side-rendering/build/main.js @@ -220,7 +220,8 @@ var xlink$1 = namespaces_1.xlink; var defaultConfig = { attrs: ( obj = { - style: ['position: absolute', 'width: 0', 'height: 0'].join('; ') + style: ['position: absolute', 'width: 0', 'height: 0'].join('; '), + 'aria-hidden': 'true' }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj ) }; var obj; diff --git a/package.json b/package.json index b2029e1..7cc5f72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svg-sprite-loader", - "version": "5.1.0", + "version": "5.1.1", "description": "Webpack loader for creating SVG sprites", "keywords": [ "svg",