Welcome to WebmasterWorld Guest from 54.144.206.214

Forum Moderators: ergophobe

Accesibility and Pop-ups

   
3:41 pm on Mar 9, 2011 (gmt 0)

10+ Year Member


Is a pop-up considered acceptible if the user is warned first and given the chance to decline?
4:50 pm on Mar 9, 2011 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



I don't think accessibility demands warning the user, nor does warning the user imply accessibility.

I think the key is that the link is a real link, and the Javascript is external and uses the DOM to trap the link and make it a popup. Anyone with accessibility issues around popup will then be able to disable the popups and have all popups go straight to a new, standard page.
4:54 pm on Mar 17, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Could you clarify your definition of a pop-up? Automatically generated pop ups are the windows that load without anyone's action, these are the ones that are the scourge of the web. Unfortunately, javascript generated new windows have been lumped in with these. Some good examples are a help pop up or other supplemental information that can be accessed and is not enough to warrant it's own full page, and is only accessed when the user clicks a link - thereby providing his or her "permission" to access the document.

In the first case, seems like a chicken and an egg, how can you give them the option to decline without throwing some alert or pop up itself?

In the second case, as ergo says, some approaches render the content inaccessible as it doesn't work if Javascript is disabled:

<a href="javascript:popUp(somefile.html)">
<a href="#" onclick="popUp(somefile.html);">

Easily fixed . . .

<a href="somefile.html" onclick="return popUp(somefile.html);">

You'd return false from the popUp function which is what stops the page from navigating to somefile.html (or top of the page in the case of #.)
5:06 pm on Mar 17, 2011 (gmt 0)

10+ Year Member



Thank you both. Rocknbil, your final example is exactly what I'm doing already.
8:19 am on Aug 14, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Again, not strictly pop-ups, but I was just coming here to start a new thread on the subject (well a related subject). I hope itís OK to add this to this thread.

I have a client who insists on external links on part of their site opening up into a new window. The decision has been made and so the target=ď_blankĒ method has been used.

Iíve been wondering how best to make this as user friendly as possible. Labelling the fact that the link will open into a new browser window is one option. One other option might be to give the user a choice as to whether to have the link open in a new window, or function as a normal link. But Iíd be interested in hearing any other approaches.
8:44 am on Aug 14, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Shoot the client? This is exactly why the w3c folks thought long and hard about whether the 'target = "_blank"' feature should be retained at all in HTML5. (Luckily they kept it, because you need it for situations where you can't do javascript and you're not creating a full-fledged second window.)

On my own pages I tend to use two different forms of link highlighting: one for links that lead elsewhere on the site or even on the same page, another for external links. By now, all browsers make it easy to open links in a new window or tab if you prefer. So you don't have to force a choice on the user. Can't anyway, because even if you specify "_blank" they can change it in their prefs. At least to "new tab" instead of "new window".

Some sites do warn you when you click on an off-site link. "Are you sure you want to do this?" But all the examples I can think of are government sites where they can say with a straight face that the place you're going to may not be as reliable as the site you're currently on ;)
9:41 pm on Aug 14, 2011 (gmt 0)

10+ Year Member



I am using JavaScript to alert the user to the fact that something unexpected is happening and allow the choice to block it. If scripting is not enabled, the link opens in the same window. The links look like this; note the "onclick..." item:

<a href="http://www.mozilla.org/" onclick="return OffSite(this);" title="Mozilla">mozilla.org</a>

The code to handle it also does forms and and "onclick" buttons:

function OffSite(What) {
// <a href="http://..." onclick="return OffSite(this);">...</a>
// <form ... onsubmit="return OffSite(this);...">
// button onclick="OffSite(this);..."
var OS_href, OS_action, OS_onclick, OS_Message, OS_Confirm;
OS_href=What['href'];
OS_action=What['action'];
OS_onclick=What['onclick'];
if ((OS_href)
&& (OS_href != '')
&& (OS_href != 'undefined')) { // an "a" tag
if (OS_href.substring(0,4) == 'http') { // only the non-404's
What.target='_blank';
OS_Message ='';
OS_Message+='You are now leaving my site; thank you for ';
OS_Message+='visiting. The target site may open in ';
OS_Message+='a new window; please close it when you wish ';
OS_Message+='to return. ';
OS_Confirm=confirm(OS_Message);
return OS_Confirm;
}
return true;
} // end of "a" tag
if ((OS_action)
&& (OS_action != '')
&& (OS_action != 'undefined')) { // a "form" tag
What.target='_blank';
OS_Message ='';
OS_Message+='This form links to a program outside of my ';
OS_Message+='site. It may open it\'s results in a new ';
OS_Message+='window; please close it when you wish to ';
OS_Message+='return. ';
OS_Confirm=confirm(OS_Message);
return OS_Confirm;
} // end of "form" tag
if ((OS_onclick)
&& (OS_onclick != '')
&& (OS_onclick != 'undefined')) { // an "onclick" button
OS_Message ='';
OS_Message+='This button links to a program outside of my ';
OS_Message+='site. It may open in a new window; please ';
OS_Message+='close it when you wish to return. ';
OS_Confirm=confirm(OS_Message);
return OS_Confirm;
} // end of "onclick" button
return true;
} // OffSite
 

Featured Threads

Hot Threads This Week

Hot Threads This Month