MCPcopy Create free account
hub / github.com/microsoft/SandDance / warnInvalidARIAProps

Function warnInvalidARIAProps

docs/external/js/react-dom.development.js:5516–5538  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

5514 }
5515
5516 function warnInvalidARIAProps(type, props) {
5517 {
5518 var invalidProps = [];
5519
5520 for (var key in props) {
5521 var isValid = validateProperty(type, key);
5522
5523 if (!isValid) {
5524 invalidProps.push(key);
5525 }
5526 }
5527
5528 var unknownPropString = invalidProps.map(function (prop) {
5529 return '`' + prop + '`';
5530 }).join(', ');
5531
5532 if (invalidProps.length === 1) {
5533 error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
5534 } else if (invalidProps.length > 1) {
5535 error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
5536 }
5537 }
5538 }
5539
5540 function validateProperties(type, props) {
5541 if (isCustomComponent(type, props)) {

Callers 1

validatePropertiesFunction · 0.85

Calls 2

validatePropertyFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected