blob: ae3e8e0f72818f7db8abd7ec685774041283d555 [file] [log] [blame]
Derick Montague80267972021-02-16 09:47:03 -06001const setFocusMixin = {
2 methods: {
3 setFocus(element) {
4 element.setAttribute('tabindex', '-1');
5 element.focus();
6 // Reason: https://axesslab.com/skip-links/#update-3-a-comment-from-gov-uk
7 element.removeAttribute('tabindex');
8 },
9 },
10};
11
12export default setFocusMixin;