New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qualweb/html-techniques

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qualweb/html-techniques - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

3

dist/lib/decorators.js

@@ -8,2 +8,3 @@ 'use strict';

const util_1 = require("@qualweb/util");
const lodash_clone_1 = __importDefault(require("lodash.clone"));
function HTMLTechnique(constructor) {

@@ -19,3 +20,3 @@ const technique = techniques_json_1.default[constructor.name];

let func = function () {
return new constructor(technique);
return new constructor(lodash_clone_1.default(technique));
};

@@ -22,0 +23,0 @@ func.prototype = constructor.prototype;

@@ -30,3 +30,3 @@ 'use strict';

evaluation.verdict = 'failed';
evaluation.description = `The element doesn't contain an alt attribute`;
evaluation.description = `The area element does not contain an alt attribute`;
evaluation.resultCode = 'RC1';

@@ -36,3 +36,3 @@ }

evaluation.verdict = 'failed';
evaluation.description = `The element's alt attribute value is empty`;
evaluation.description = `The are element contains an empty alt attribute`;
evaluation.resultCode = 'RC2';

@@ -42,3 +42,3 @@ }

evaluation.verdict = 'warning';
evaluation.description = 'Please verify the alt attribute value describes correctly the correspondent area of the image';
evaluation.description = 'Please verify that the alt attribute describes correctly the corresponding area of the image';
evaluation.resultCode = 'RC3';

@@ -45,0 +45,0 @@ }

@@ -48,3 +48,3 @@ 'use strict';

});
let validationUrl = endpoint ? endpoint + encodeURIComponent(url) : this.endpoint + encodeURIComponent(url);
const validationUrl = endpoint ? endpoint + encodeURIComponent(url) : this.endpoint + encodeURIComponent(url);
let response;

@@ -51,0 +51,0 @@ try {

{
"name": "@qualweb/html-techniques",
"version": "0.3.4",
"version": "0.3.5",
"description": "Implementation of the WCAG 2.1 html techniques",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,2 +6,3 @@ 'use strict';

import { DomUtils } from '@qualweb/util';
import clone from 'lodash.clone';

@@ -20,3 +21,3 @@ function HTMLTechnique<T extends { new (...args: any[]): {} }>(constructor: T) {

let func: any = function () {
return new constructor(technique);
return new constructor(clone(technique));
}

@@ -23,0 +24,0 @@ func.prototype = constructor.prototype;

@@ -30,11 +30,11 @@ 'use strict';

evaluation.verdict = 'failed';
evaluation.description = `The element doesn't contain an alt attribute`;
evaluation.description = `The area element does not contain an alt attribute`;
evaluation.resultCode = 'RC1';
} else if (alt.trim() === '') { // fails if the element's alt attribute value is empty
evaluation.verdict = 'failed';
evaluation.description = `The element's alt attribute value is empty`;
evaluation.description = `The are element contains an empty alt attribute`;
evaluation.resultCode = 'RC2';
} else { // the element contains an non-empty alt attribute, and it's value needs to be verified
evaluation.verdict = 'warning';
evaluation.description = 'Please verify the alt attribute value describes correctly the correspondent area of the image';
evaluation.description = 'Please verify that the alt attribute describes correctly the corresponding area of the image';
evaluation.resultCode = 'RC3';

@@ -41,0 +41,0 @@ }

@@ -55,3 +55,3 @@ 'use strict';

let validationUrl = endpoint ? endpoint + encodeURIComponent(url) : this.endpoint + encodeURIComponent(url);
const validationUrl = endpoint ? endpoint + encodeURIComponent(url) : this.endpoint + encodeURIComponent(url);

@@ -58,0 +58,0 @@ let response: any;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc