Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (18 sloc) 705 Bytes
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getComputedRole;
var _getExplicitRole = _interopRequireDefault(require("./getExplicitRole"));
var _getImplicitRole = _interopRequireDefault(require("./getImplicitRole"));
/**
* Returns an element's computed role, which is
*
* 1. The valid value of its explicit role attribute; or
* 2. The implicit value of its tag.
*/
function getComputedRole(tag, attributes) {
return (0, _getExplicitRole["default"])(tag, attributes) || (0, _getImplicitRole["default"])(tag, attributes);
}
module.exports = exports.default;