Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

26 строки
764 B

  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = getComputedRole;
  6. var _getExplicitRole = require('./getExplicitRole');
  7. var _getExplicitRole2 = _interopRequireDefault(_getExplicitRole);
  8. var _getImplicitRole = require('./getImplicitRole');
  9. var _getImplicitRole2 = _interopRequireDefault(_getImplicitRole);
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. /**
  12. * Returns an element's computed role, which is
  13. *
  14. * 1. The valid value of its explicit role attribute; or
  15. * 2. The implicit value of its tag.
  16. */
  17. function getComputedRole(tag, attributes) {
  18. return (0, _getExplicitRole2.default)(tag, attributes) || (0, _getImplicitRole2.default)(tag, attributes);
  19. }