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

Function warnInvalidARIAProps

code/communication/public/app.js:15816–15835  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

15814}
15815
15816function warnInvalidARIAProps(type, props) {
15817 var invalidProps = [];
15818
15819 for (var key in props) {
15820 var isValid = validateProperty(type, key);
15821 if (!isValid) {
15822 invalidProps.push(key);
15823 }
15824 }
15825
15826 var unknownPropString = invalidProps.map(function (prop) {
15827 return '`' + prop + '`';
15828 }).join(', ');
15829
15830 if (invalidProps.length === 1) {
15831 warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15832 } else if (invalidProps.length > 1) {
15833 warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15834 }
15835}
15836
15837function validateProperties(type, props) {
15838 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