(type, props)
| 16030 | } |
| 16031 | |
| 16032 | function 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 | |
| 16053 | function validateProperties(type, props) { |
| 16054 | if (isCustomComponent(type, props)) { |
no test coverage detected