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

Function warnInvalidARIAProps

code/composition/public/app.js:15919–15938  ·  view source on GitHub ↗
(type, props)

Source from the content-addressed store, hash-verified

15917}
15918
15919function warnInvalidARIAProps(type, props) {
15920 var invalidProps = [];
15921
15922 for (var key in props) {
15923 var isValid = validateProperty(type, key);
15924 if (!isValid) {
15925 invalidProps.push(key);
15926 }
15927 }
15928
15929 var unknownPropString = invalidProps.map(function (prop) {
15930 return '`' + prop + '`';
15931 }).join(', ');
15932
15933 if (invalidProps.length === 1) {
15934 warning(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15935 } else if (invalidProps.length > 1) {
15936 warning(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop%s', unknownPropString, type, getStackAddendum());
15937 }
15938}
15939
15940function validateProperties(type, props) {
15941 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