|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Enthusiast
![]() Join Date: Feb 2007
Location: East of Ottawa, ON
Posts: 89
|
window.open
Is this accessible?
I did add a note indicating that it opens in a new window. "Please note: this link will open the page in a new browser window." |
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2004
Location: Åsnorrbodarna
Posts: 11,581
|
That depends on how you invoke window.open().
This will be accessible, HTML4Strict Code:
This won't, HTML4Strict Code:
|
|
|
|
|
|
#3 |
|
SitePoint Enthusiast
![]() Join Date: Feb 2007
Location: East of Ottawa, ON
Posts: 89
|
I'm using jquery click function for this.
So if I disable javascript the page will open in the same window. |
|
|
|
|
|
#4 |
|
SitePoint Enthusiast
![]() Join Date: Feb 2007
Location: East of Ottawa, ON
Posts: 89
|
JavaScript Code:
|
|
|
|
|
|
#5 | |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2004
Location: Åsnorrbodarna
Posts: 11,581
|
Quote:
Also, the text that informs the user that the link opens in a new window should be created with JavaScript, since the function itself requires JavaScript. And it shouldn't be in a title attribute only, since there is no guarantee that a user will see that. Especially those of us who navigate by keyboard rarely see those advisory titles. |
|
|
|
|
|
|
#6 |
|
SitePoint Mentor
![]() Join Date: Feb 2009
Location: England, UK
Posts: 4,416
|
I would also note that you should have some form of fail-safe mechanism in place to check if popup's are blocked, the ideal scenario would be that if people have pop-up messages enabled then it would use your unobtrusive script to make that happen, but if pop-up's are blocked (possibly test through JavaScript?) or if scripting is not enabled, it will simply navigate to the URL. I have seen websites redirect when a pop-up fails so it must be possible
![]() |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 13:03.












Linear Mode
