How to set focus to close button on opening fancybox
-
Hi There,
We’re building an accessible website for visually and hearing impaired people.
Try navigating this page: https://dev-cordorg.pantheonsite.io/what-we-do/housing/ with the “tab” button on keyboard. What we actually want to make this page fully accessible using only keyboard and no mouse events. This page has a video popup which opens in fancybox on a button click. https://www.screencast.com/t/j6WCNbghlTe4 Is it possible to set focus to close button once the popup is opened.? so they can easily hit “enter” key and just close this popup.? I’ve tried adding this:
afterShow: function () {$(“#fancybox-close”).focus(); alert(“clicked”);}
but no luck. Can you please help.?Thanks in advance.!
The page I need help with: [log in to see the link]
- The topic ‘How to set focus to close button on opening fancybox’ is closed to new replies.