text: /**
   * @fileoverview Enforce no accesskey attribute on element.
   * @author Ethan Cohen
   */
  'use strict';
  
  // ----------------------------------------------------------------------------
  // Rule Definition
  // ----------------------------------------------------------------------------
  
  var _getAttribute = require('../util/getAttribute');
  
  var _getAttribute2 = _interopRequireDefault(_getAttribute);
  
  var _getAttributeValue = require('../util/getAttributeValue');
  
  var _getAttributeValue2 = _interopRequireDefault(_getAttributeValue);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  var errorMessage = 'No access key attribute allowed. Inconsistencies ' + 'between keyboard shortcuts and keyboard comments used by screenreader ' + 'and keyboard only users create a11y complications.';
  
  module.exports = function (context) {
    return {
      JSXOpeningElement: function JSXOpeningElement(node) {
        var accessKey = (0, _getAttribute2.default)(node.attributes, 'accesskey');
        var accessKeyValue = (0, _getAttributeValue2.default)(accessKey);
  
        if (accessKey && accessKeyValue) {
          context.report({
            node: node,
            message: errorMessage
          });
        }
      }
    };
  };
  
  module.exports.schema = [{ type: 'object' }];