blob: ae3e8e0f72818f7db8abd7ec685774041283d555 [file] [log] [blame]
const setFocusMixin = {
methods: {
setFocus(element) {
element.setAttribute('tabindex', '-1');
element.focus();
// Reason: https://axesslab.com/skip-links/#update-3-a-comment-from-gov-uk
element.removeAttribute('tabindex');
},
},
};
export default setFocusMixin;