Derick Montague | 8026797 | 2021-02-16 09:47:03 -0600 | [diff] [blame] | 1 | const 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 | |||||
12 | export default setFocusMixin; |