MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / warnInvalidARIAProps

Function warnInvalidARIAProps

code/dependency-injection/public/app.js:15874–15893  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

15872}
15873
15874function warnInvalidARIAProps(type, props) {
15875 var invalidProps = [];
15876
15877 for (var key in props) {
15878 var isValid = validateProperty(type, key);
15879 if (!isValid) {
15880 invalidProps.push(key);
15881 }
15882 }
15883
15884 var unknownPropString = invalidProps.map(function (prop) {
15885 return '`' + prop + '`';
15886 }).join(', ');
15887
15888 if (invalidProps.length === 1) {
15889 warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15890 } else if (invalidProps.length > 1) {
15891 warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15892 }
15893}
15894
15895function validateProperties(type, props) {
15896 if (isCustomComponent(type, props)) {

Callers 1

validatePropertiesFunction · 0.70

Calls 3

warningFunction · 0.85
validatePropertyFunction · 0.70
getStackAddendumFunction · 0.70

Tested by

no test coverage detected