(type, props)
| 15012 | } |
| 15013 | |
| 15014 | function warnInvalidARIAProps(type, props) { |
| 15015 | var invalidProps = []; |
| 15016 | |
| 15017 | for (var key in props) { |
| 15018 | var isValid = validateProperty(type, key); |
| 15019 | if (!isValid) { |
| 15020 | invalidProps.push(key); |
| 15021 | } |
| 15022 | } |
| 15023 | |
| 15024 | var unknownPropString = invalidProps.map(function (prop) { |
| 15025 | return '`' + prop + '`'; |
| 15026 | }).join(', '); |
| 15027 | |
| 15028 | if (invalidProps.length === 1) { |
| 15029 | warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15030 | } else if (invalidProps.length > 1) { |
| 15031 | warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum()); |
| 15032 | } |
| 15033 | } |
| 15034 | |
| 15035 | function validateProperties(type, props) { |
| 15036 | if (isCustomComponent(type, props)) { |
no test coverage detected