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

Function warnInvalidARIAProps

code/redux/public/app.js:16032–16051  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

16030}
16031
16032function warnInvalidARIAProps(type, props) {
16033 var invalidProps = [];
16034
16035 for (var key in props) {
16036 var isValid = validateProperty(type, key);
16037 if (!isValid) {
16038 invalidProps.push(key);
16039 }
16040 }
16041
16042 var unknownPropString = invalidProps.map(function (prop) {
16043 return '`' + prop + '`';
16044 }).join(', ');
16045
16046 if (invalidProps.length === 1) {
16047 warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
16048 } else if (invalidProps.length > 1) {
16049 warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
16050 }
16051}
16052
16053function validateProperties(type, props) {
16054 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