Skip to content

Commit d10d529

Browse files
committed
updated logic
1 parent b8d2c87 commit d10d529

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

lib/checks/color/color-contrast-enhanced.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
},
2121
"pseudoSizeThreshold": 0.25,
2222
"shadowOutlineEmMax": 0.1,
23-
"textStrokeEmMin": 0.03
23+
"textStrokeEmMin": 0.03,
24+
"ruleId": "color-contrast-enhanced"
2425
},
2526
"metadata": {
2627
"impact": "serious",

lib/checks/color/color-contrast-evaluate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ export default function colorContrastEvaluate(node, options, virtualNode) {
169169

170170
return isValid;
171171
} catch (err) {
172-
a11yEngine.axeErrorHandlers.addCheckError('axe-color-contrast-check', err);
172+
this.data({ messageKey: 'Check error' });
173+
a11yEngine.errorHandler.addCheckError(options?.ruleId, err);
173174
return undefined;
174175
}
175176
}

lib/checks/color/color-contrast.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"pseudoSizeThreshold": 0.25,
2020
"shadowOutlineEmMax": 0.2,
21-
"textStrokeEmMin": 0.03
21+
"textStrokeEmMin": 0.03,
22+
"ruleId": "color-contrast"
2223
},
2324
"metadata": {
2425
"impact": "serious",

lib/checks/forms/autocomplete-a11y-evaluate.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { isValidAutocomplete } from '../../commons/text';
2-
import ErrorHandler from '../../core/errors/error-handler';
32

43
function checkIsElementValidAutocomplete(node, options, virtualNode) {
54
const autocomplete = virtualNode.attr('autocomplete')?.toLowerCase().trim();
@@ -67,7 +66,10 @@ function autocompleteA11yEvaluate(node, options, virtualNode) {
6766
return checkIsElementValidAutocomplete(node, options, virtualNode);
6867
}
6968
} catch (err) {
70-
ErrorHandler.addCheckError('autocomplete-attribute-valid-check', err);
69+
a11yEngine.errorHandler.addCheckError(
70+
'autocomplete-attribute-valid-check',
71+
err
72+
);
7173
return undefined;
7274
}
7375
}

0 commit comments

Comments
 (0)