Skip to main content

Jim Byrne Accessible Website Design Glasgow for The Third Sector, Voluntary, Charities and Not for Profits

Accessible, Responsive Website Design
Jim Byrne Web Designer

Ensure links work when Javascript doesn’t

If you use Javascript to ‘jazz up’ the navigation on your website, make sure the links still work when Javascript is turned off (or is not supported). Here is a technique I have seen used quite often on web pages; Javascript being used to open a new window when a user clicks a link:

Contact Us

Note that in the above example the URL of the page being linked to will only appear as a result of running the script. This is not good; a user who has Javascript turned off or not available, will not be able to link to this particular page.

You can be sure that whatever you are trying to achieve with your Javascript, there will be a more accessible way to do it, and that is true in this case. The following example is from, and shows how the same effect can be achieved without breaking the link:

Contact Us

(Please note, the W3C guidelines say that you should always warn users before opening a new window.)

Links Javascript article.

Related content


Written by :

Avatar of JamesByrne

Give me a phone if you would like me to test the accessibility of your website:

I provided feedback on the WCAG 2, have two decades of experience and worked with hundreds of organisations.

07810 098 119

Alternative access to client feedback ››

Client Quotes

Loading Quotes...