diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-01-25 16:17:01 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-01-25 16:17:01 +0000 |
| commit | 50871fb1c2ea40847b6ffeb451f10e67c8a2f1bc (patch) | |
| tree | fdc113a00f4e814208975a6cf943738e8b95a3e6 /resources/assets/javascripts | |
| parent | 50202028eab9dea122fb1b8bd082b60f45c7152c (diff) | |
fix for BIESt #583
Diffstat (limited to 'resources/assets/javascripts')
| -rw-r--r-- | resources/assets/javascripts/lib/skip_links.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/resources/assets/javascripts/lib/skip_links.js b/resources/assets/javascripts/lib/skip_links.js index c37af9e..1a4a9d0 100644 --- a/resources/assets/javascripts/lib/skip_links.js +++ b/resources/assets/javascripts/lib/skip_links.js @@ -79,9 +79,14 @@ const SkipLinks = { SkipLinks.moveSkipLinkNavigationOut(); jQuery('.focus_box').removeClass('focus_box'); jQuery(fragment).addClass('focus_box'); - jQuery(fragment) - .click() - .focus(); + if (jQuery(fragment).is(':focusable')) { + jQuery(fragment) + .click() + .focus(); + } else { + //Set the focus on the first focusable element: + jQuery(fragment).find(':focusable').eq(0).focus(); + } SkipLinks.activeElement = fragment; return true; } else { |
