diff --git a/packages/dnb-ui-lib/src/components/form-status/__tests__/__snapshots__/FormStatus.test.js.snap b/packages/dnb-ui-lib/src/components/form-status/__tests__/__snapshots__/FormStatus.test.js.snap index 1e131cd2737..b10f118425d 100644 --- a/packages/dnb-ui-lib/src/components/form-status/__tests__/__snapshots__/FormStatus.test.js.snap +++ b/packages/dnb-ui-lib/src/components/form-status/__tests__/__snapshots__/FormStatus.test.js.snap @@ -34,7 +34,7 @@ exports[`FormStatus component have to match snapshot 1`] = ` width={null} > 1) { const lastPartOfIconName = nameParts.reverse()[0] const potentialSize = ListDefaultIconSizes.filter( @@ -243,8 +248,12 @@ export default class Icon extends PureComponent { role: 'img', title }) + // get the alt - wrapperParams['aria-label'] = (alt || title || name).replace(/_/g, ' ') + wrapperParams['aria-label'] = String( + alt || title || Icon.getIconNameFromComponent(props) + ).replace(/_/g, ' ') + if (area_hidden) { // wrapperParams['role'] = 'presentation' // almost the same as aria-hidden wrapperParams['aria-hidden'] = area_hidden