How to use the eslint-plugin-jsx-a11y/lib/rules/media-has-caption.js.create function in eslint-plugin-jsx-a11y

To help you get started, we’ve selected a few eslint-plugin-jsx-a11y examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maranran / eslint-plugin-vue-a11y / lib / rules / media-has-caption.js View on Github external
});
          return;
        }
        const hasCaption = trackChildren.some((track) => {
          const kindProp = utils.getAttribute(track, 'kind');
          const kinddValue = kindProp && utils.getAttributeValue(kindProp);
          return kindProp && kinddValue.toLowerCase() === 'captions';
        });
        if (!hasCaption) {
          context.report({
            node,
            message: errorMessage,
          });
        }
      }
    }, altRule.create(context))
  }
};