d2-ui
Version:
23 lines (17 loc) • 531 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getImplicitRoleForAnchor;
var _getAttribute = require('../getAttribute');
var _getAttribute2 = _interopRequireDefault(_getAttribute);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns the implicit role for an anchor tag.
*/
function getImplicitRoleForAnchor(attributes) {
if ((0, _getAttribute2.default)(attributes, 'href')) {
return 'link';
}
return '';
}
;