You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#102100 Possible to have focus move to pop up window when opened?

Posted in ‘Mediabox’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by hzwicewicz on Friday, 17 January 2020 16:46 GMT

hzwicewicz
I have created an alert button link and am using JCE MediaBox to open an article on my site in a popup window.
Is there a way to have the focus move to the pop up window rather than the page beneath the pop up?

Ryan
I have created an alert button link and am using JCE MediaBox to open an article on my site in a popup window.


Please post a link to an example.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

hzwicewicz
Sure. Here is a link: https://bit.ly/2Ymncfy

You’ll see two red alert button links under the menu.

Ryan
Focus is initially set on the button elements of the popup, in this instance the Close button.

I notice that you don't have any form elements in these popup windows, so what is the reason for moving focus to the popup contents?

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

hzwicewicz
When the pop up opens, you can't navigate through it using the tab key like you can throughout the rest of the site's content.
So for example, if I hit tab trying to navigate to a link within the text, nothing happens. Also if the focus is on the close button, then I'd have to assume a screen reader wouldn't read any of the text in the pop up window. For this website, that's an important consideration.

I'll need to present another solution for my client if the focus cannot be set to move to the content of the window.

Thanks

Ryan
Please try JCE MediaBox 2.0.14 Beta 4 - https://www.joomlacontenteditor.net/downloads/mediabox/development

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

hzwicewicz
Thanks for the new version to try. I can report that focus is now within the content when the window opens and I can navigate using the tab key.
Only thing I was still concerned about was that the "Close" link focus color didn't provide enough of a contrast to make it obvious that focus was on the close button.
Got around that by adding a rule to my custom style sheet and it now turns red on focus.

I'm happy with this - thanks very much :)

hzwicewicz
In reference to the new beta version of MediaBox you provided me with back in December (JCE MediaBox 2.0.14 Beta 4)
I was working on the site where I installed this beta version today, and noticed that if you create a new link, the class jcepopup is by default assigned as follows:

<p><a class="jcepopup" href="https://www.joomlacontenteditor.net/#" data-mediabox="1">link</a></p>

The only way I can get rid of the class is to go into the html and strip it out. I tried removing it through the editor, but once I hit update it saves with the jcepopup class.
Any idea why that might be happening?

Ryan
In Editor Profiles -> Plugin Parameters -> Link, scroll down to the Popups section and set the Default option to Not Set.

https://cdn.joomlacontenteditor.net/tmp/102100-possible-to-have-focus-move-to-pop-up-window-when-opened.jpg

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

hzwicewicz
Perfect thanks so much for the quick reply