@automattic/vip-design-system 0.26.5 → 0.26.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,6 @@ var Validation = function Validation(_ref) {
|
|
|
27
27
|
describedId = _ref$describedId === void 0 ? null : _ref$describedId,
|
|
28
28
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
29
29
|
var Icon = isValid ? _md.MdCheckCircle : _md.MdErrorOutline;
|
|
30
|
-
var IconLabel = isValid ? 'Valid' : 'Invalid';
|
|
31
30
|
return (0, _jsxRuntime.jsxs)("p", (0, _extends2["default"])({
|
|
32
31
|
sx: {
|
|
33
32
|
color: isValid ? 'success' : 'error',
|
|
@@ -42,8 +41,7 @@ var Validation = function Validation(_ref) {
|
|
|
42
41
|
sx: {
|
|
43
42
|
mr: 1
|
|
44
43
|
},
|
|
45
|
-
|
|
46
|
-
"aria-label": IconLabel
|
|
44
|
+
"aria-hidden": "true"
|
|
47
45
|
}), children]
|
|
48
46
|
}));
|
|
49
47
|
};
|
package/package.json
CHANGED
|
@@ -12,7 +12,6 @@ import { MdErrorOutline, MdCheckCircle } from 'react-icons/md';
|
|
|
12
12
|
|
|
13
13
|
const Validation = ( { children, isValid, describedId = null, ...props } ) => {
|
|
14
14
|
const Icon = isValid ? MdCheckCircle : MdErrorOutline;
|
|
15
|
-
const IconLabel = isValid ? 'Valid' : 'Invalid';
|
|
16
15
|
|
|
17
16
|
return (
|
|
18
17
|
<p
|
|
@@ -26,7 +25,7 @@ const Validation = ( { children, isValid, describedId = null, ...props } ) => {
|
|
|
26
25
|
id={ describedId ? `describe-${ describedId }-validation` : undefined }
|
|
27
26
|
{ ...props }
|
|
28
27
|
>
|
|
29
|
-
<Icon sx={ { mr: 1 } }
|
|
28
|
+
<Icon sx={ { mr: 1 } } aria-hidden="true" />
|
|
30
29
|
{ children }
|
|
31
30
|
</p>
|
|
32
31
|
);
|