WebsiteDays.com create your web site free, Hosting, Coding, E-commerce, Free Website Builder. Download free website builder to create your website! Personal, and ECommerce website builders...

WebsiteDays.com for spain bilbao

Click on your region below to contact a Websitedays.com designer, or Websitedays.com sales person for info about Online Website builder system.

You can also send an email to

and we can forward your enquiry to respective designers in your area.

Adeje Aguilas Albacete
Albox Alcala de Henares Alcorcon
Alcoy Alcudia Algeciras
Alhaurín el Grande Alicante Almería
Andratx Arboleas Archena
Archidona Arenys de Mar Arenys de Munt
Argentona Arnedo Arona
Arriondas Astigarraga Avila
Aviles Ayamonte Badajoz
Badalona Banyalbufar Barbera del Valles
Barcelona Bejar Benahavis
Benalmadena Benalup Benidorm
Berga Bergara Bilbao
Bossost Brena Alta Bunyola
Burgos Cadiz Cala Sant Vicenc
Calan Porter Calpe Calvia
Campillos Cangas Cangas de Onis
Cantoria Cardedeu Cartagena
Castelldefels Castello d Empuries Castello de la Plana
Cerdanyola Cintruenigo Ciutadella de Menorca
Competa Cordoba Coria
Coslada Cuenca Daganzo
Denia Durcal El Campello
El Puerto de Santa María Elche Elvissa
Empuriabrava Es Cana Esplugas del Llobregat
Estepona Ferrol Figueres
Frigiliana Fuengirola Gandia
Gaucín Getafe Getaria
Gijon Girona Granada
Granollers Grazalema Guarena
Haro Hita Huelva
Huesca Ibiza Igualada
Isla Cristina Jaca Jalon
Javea Jerez de la Frontera L Estartit
La Coruna La Eliana La Escala
La Herradura La Laguna La Rambla
Las Matas Las Regueras Leon
Lerida Llanca Llanes
Llavorsí Lloret de Mar Logrono
Lorca Los Cristianos Lugo
Madrid Magalluf Mahon
Malaga Mallorca Manacor
Manresa Marbella Masquefa
Mataro Mazarron Medina de Rioseco
Menorca Miami Playa Mijas
Mojacar Mondragon Montefrio
Montilla Morella Murcia
Nerja Onda Onteniente
Orihuela Ourense Oviedo
Oyon Padron Palamos
Palma de Mallorca Pamplona Panes
Parets del Vallès Pasajes Paterna
Perelada Periana Platja d Aro
Pontevedra Porto Cristo Pozuelo de Alarcon
Puente Genil Puerto de la Cruz Puerto del Carmen
Puig-reig Quintanilla de Onesimo Requena
Reus Ribadesella Riudellots de La Selva
Riveira Ronda Roquetas de Mar
Rota S Agaro Sabadell
Salamanca Salou San Antonio Abad
San Millan de la Cogolla San Roque San Sebastian Donostia
Sanlucar de Barrameda Sant Boi de Llobregat Sant Cugat del Valles
Sant Fruitos de Bages Santa Cruz Santa Eulalia del Río
Santa Ponsa Santander Santiago de Compostela
Santillana del Mar Sedella Segovia
Seva Sevilla Sitges
Soller Somorrostro Tacoronte
Tarifa Tarragona Tarrega
Terrassa Teruel Toledo
Torre del Mar Torremolinos Torrent
Torrevieja Torrox Trujillo
Tudela Valencia Valladolid
Valldemossa Vejer de la Frontera Vera
Vic Vigo Vilafranca del Penedes
Vitoria Yecla Zamudio
Zaragoza

»   A More Accessible Pop-Up Window

Article submitted in category: Web Design And Development
Tags: | <a | javascript | those | reference | page | hypertext | hypertext reference | accessible | new |

A More Accessible Pop-Up Window by: Karl Groves

More and more commercial websites are featuring pop-ups these days. In many instances, I'm noticing more pop-ups being used for advertising, probably due to the harsh reality that is "banner blindness". In other cases, pop-ups are used to display supplemental content to the parent page. Unfortunately, many designers know little about how to make a proper pop-up window that will be accessible.

Among the many concerns of accessible design is found in "Guideline 6" of the W3C's Web Content Accessibility Guidelines: http://www.w3.org/TR/WCAG10/#gl-new-technologies - "Ensure that pages are accessible even when newer technologies are not supported or are turned off." Simply put, you should ensure that your content remains accessible to those who modify their accessibility settings to disable scripting or whose choice of adaptive technology does not recognize scripting. See also the relevant Section 508 criteria: http://www.access-board.gov/sec508/guide/1194.22.htm#(l)

Popups are among the items that most often violate this accessibility guideline

A common pop-up window link will probably begin like this: <a href="#" onClick="window.open...... or: <a href="javascript:; onclick="window.open(....... In both instances, the link becomes completely unusable to those with scripts turned off or with browsers that do not recognize JavaScript.

From here on out, lets assume our target audience fits one of the two situations just mentioned - either they have JavaScript disabled or their browser cannot recognize JavaScript.

In the first case, using "#" as the hypertext reference will result, at best, in their being taken to the top of the page. The "#" sign is interpreted as what's known as a "Fragment Identifier Separator" ( see geekspeak at - http://www.w3.org/Addressing/URL/4_2_Fragments.html ). What this means to us is that the "#" is supposed to point somewhere, such as a named object on the page. It is not a default "Do Nothing" character. The hash symbol prepends the name of the target. So that <a href="#contact">Contact me</a> will take you to a place on the page that is named "contact" - <a name="contact"></a>

Using just plain "#" as the hypertext reference is bad because "A void fragment-id with or without the hash sign means that the URL refers to the whole object." In most browsers, it will be interpreted as pointing back to the beginning of the page. At best, it will do nothing when clicked.

In the second case, using "javascript:;" as the hypertext reference simply does nothing. Remember, we're dealing with those who for one reason or the other can't use anything dependent upon JavaScript. So again, this link does nothing for someone whose browser does not recognize javascript.

It can be done better and work well for all

Fortunately, we can create an accessible alternative that functions perfectly for those with JavaScript enabled, yet degrades well for those who don't. We do this by using a real link to the actual destination in our hypertext reference:

<a href="file.html" onclick="window.open('file.html', 'window_name', 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=xxx, height=xxx'); return false"> Open Window </a>

The above is the "accessible" method to open a popup (opening new windows is bad anyway, so I guess this is the lesser of two evils). Using the real file as the hypertext reference, but set the link to "return false" will operate properly whether the person has JavaScript enabled or not. Those without JavaScript enabled still get to the content, and those who have JavaScript get the popup as intended.

Now, here's the treat: Many people offer a means to close the pop-up that has just opened. Again, they do this with either <a href="#"... or <a href="javascript:;... Like so: <a href="#" onClick="window.close()">Close</a> Well, like I said before, all this does is take them to the top of the page. Assuming the popup is linked on only one page we can take them back by placing the referring file in the hypertext reference: <a href="referrer.html" onClick="window.close()">Close</a>

The use of the word "Close" might be confusing, but there are two schools of thought here.

1. By not opening the new window on those w/o JavaScript, the back button still works and will use this

2. Using a title will help them predict what will happen. Like so: <a href="referrer.html" title="clicking this link will take you back to the referrer if you don't have JavaScript" onClick="window.close()">Close</a>

Alternatively, you might also use the alt text attribute of a transparent spacer image: <a href="referrer.html"><img src="path/spacer.gif" width="1" height="1" border="0" alt="[Go Back>"></a> (This assumes they're also surfing with images off or on a non-graphical browser)

Ultimately, this comes down to what you hear me say so often: You cannot reliably predict the user or their settings. So don't try. Make it right and it will be usable to all.

Disclaimer:

Opening new windows is bad enough as it is. The above article only aims at showing you how to make them better. The best answer is to not use them at all. Please see the following links for details -

Jakob Nielsen's Alertbox: The Top Ten New Mistakes of Web Design

Jakob Nielsen's Alertbox: Top Ten Web-Design Mistakes of 2002

Dive Into Accessibility: Day 16, Not Opening New Windows

Dan's Web Tips: Opening New Browser Windows

About The Author

Karl Groves is a freelance web designer who has done production work for such sites as National Cancer Institute, Network For Good and Aerospace Medical Association.

This article was posted on March 11, 2004