MCPcopy Create free account
hub / github.com/reactjs/react-rails / warnInvalidARIAProps

Function warnInvalidARIAProps

lib/assets/react-source/development/react.js:9088–9110  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

9086 }
9087
9088 function warnInvalidARIAProps(type, props) {
9089 {
9090 var invalidProps = [];
9091
9092 for (var key in props) {
9093 var isValid = validateProperty(type, key);
9094
9095 if (!isValid) {
9096 invalidProps.push(key);
9097 }
9098 }
9099
9100 var unknownPropString = invalidProps.map(function (prop) {
9101 return '`' + prop + '`';
9102 }).join(', ');
9103
9104 if (invalidProps.length === 1) {
9105 error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
9106 } else if (invalidProps.length > 1) {
9107 error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
9108 }
9109 }
9110 }
9111
9112 function validateProperties(type, props) {
9113 if (isCustomComponent(type, props)) {

Callers 1

validatePropertiesFunction · 0.70

Calls 2

validatePropertyFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected