Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Wed, 09 Jan 2008 20:00:18 +0000,    group: uk.net.web.authoring        back       
Bit of accessibility   
Hi all

I know this is probably a bit of a cheat to get a page to validate with a
link opening in a new window but are there any real problems with it:

<a href="sitemap.xml" title="Opens in new window"
   onclick="window.open(this.href); return false;"
   onkeypress="window.open(this.href); return false;">Example <img
src="images/nw_black.gif" alt="Opens in new window" width="12" height="10"
style="border:none;" /></a>

If javascript is turned off, I assume it will just open the link without the
desired effect of opening in a new window.  I'm also making it clear to
people that the link opens in a new window.

I just think in a case like this it's more appropriate to open the page in a
new window.

If you want to see it in context:

http://www.small-business-web-site-design.co.uk/prices.html

Also, the 'ticks'.  Is the alt text appropriate, or is it going to read as:

.co.uk domain name .co.uk domain name included

Should the alt text for each tick just say 'included', for example.

-- 
Andy Jacobs
http://www.redcatmedia.co.uk
date: Wed, 09 Jan 2008 20:00:18 +0000   author:   Andy Jacobs

Re: Bit of accessibility   
On Jan 10, 7:00 am, Andy Jacobs  wrote:
> Hi all
>
> I know this is probably a bit of a cheat to get a page to validate with a
> link opening in a new window but are there any real problems with it:
>
> <a href="sitemap.xml" title="Opens in new window"
>    onclick="window.open(this.href); return false;"
>    onkeypress="window.open(this.href); return false;">Example <img
> src="images/nw_black.gif" alt="Opens in new window" width="12" height="10"
> style="border:none;" /></a>
>
> If javascript is turned off, I assume it will just open the link without the
> desired effect of opening in a new window.  I'm also making it clear to
> people that the link opens in a new window.
>
> I just think in a case like this it's more appropriate to open the page in a
> new window.
>
> If you want to see it in context:
>
> http://www.small-business-web-site-design.co.uk/prices.html
>
> Also, the 'ticks'.  Is the alt text appropriate, or is it going to read as:
>
> .co.uk domain name .co.uk domain name included
>
> Should the alt text for each tick just say 'included', for example.
>
Well first things first.
You need to place a <noscript> tag after the script to open the new
browser window (otherwise nothing happens) when the user without JS
(including SE bots) goes to follow the link.
But if you had read the WCAG you would already know this.
--
Regards Chad. http://freewebdesignonline.org
date: Wed, 9 Jan 2008 20:07:26 -0800 (PST)   author:   Chaddy2222

Re: Bit of accessibility   
Andy Jacobs  writes:
> I know this is probably a bit of a cheat to get a page to validate with a
> link opening in a new window but are there any real problems with it:
> 
> <a href="sitemap.xml" title="Opens in new window"
>    onclick="window.open(this.href); return false;"
>    onkeypress="window.open(this.href); return false;">Example <img
> src="images/nw_black.gif" alt="Opens in new window" width="12" height="10"
> style="border:none;" /></a>

I'd put brackets around the alt text so that it reads
Example (Opens in new window)
or perhaps
Example ... alt="- Opens in new window" 
since you already have lots of brackets, rather than the current
Example Opens in new window

It would also be a good idea - since the image won't actually be
correct if Javascript is disabled - to add the image using Javascript.

> http://www.small-business-web-site-design.co.uk/prices.html
> 
> Also, the 'ticks'.  Is the alt text appropriate, or is it going to read as:
> 
> .co.uk domain name .co.uk domain name included

Yes, it will.

> Should the alt text for each tick just say 'included', for example.

Where it's just a duplication, yes (or even just alt="").

Some of them you have, for example:
A first class design for your web site[1]
...
alt="All design costs included"

In that case, just alt="included" would lose a little bit of
information... but on the other hand it's a bit odd for that
information to only be available via the alt text.

More generally, I wonder if this list would be better as an unordered
list with a custom bullet image of a tick? Since you're not offering
multiple packages some of which don't include all the features, it
doesn't seem worth repeatedly saying "included" anyway.

-- 
Chris
date: 10 Jan 2008 09:37:36 +0000   author:   Chris Morris

Re: Bit of accessibility   
[Andy]
> <a [...] onkeypress="window.open(this.href); return false;"

This makes any keypress, including Tab, try to launch the new window.
Not so good for accessibility!  8-)

--
Richie Hindle
richie@entrian.com
date: Thu, 10 Jan 2008 01:50:46 -0800 (PST)   author:   Richie Hindle

Re: Bit of accessibility   
On Jan 10, 4:07 am, Chaddy2222 <spamlovermailbox-
sicur...@yahoo.com.au> wrote:

> > <a href="sitemap.xml" title="Opens in new window"
> >    onclick="window.open(this.href); return false;"
> >    onkeypress="window.open(this.href); return false;">

> Well first things first.

> You need to place a <noscript> tag after the script to open the new
> browser window (otherwise nothing happens) when the user without JS
> (including SE bots) goes to follow the link.

Rubbish. User agents that don't support JavaScript will not go "There
are JavaScript events on this element, therefore I will ignore it
entirely". The link will just work as normal.

Noscript is generally the worst option when it comes to making things
functional without JavaScript. The normal way (for approaching a
decade now) has been to write something that works without JavaScript,
and then add JavaScript to override the normal functionality (as was
done in this example).

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
date: Thu, 10 Jan 2008 03:28:02 -0800 (PST)   author:   David Dorward

Re: Bit of accessibility   
On Jan 9, 8:00 pm, Andy Jacobs  wrote:

> I know this is probably a bit of a cheat to get a page to validate with a
> link opening in a new window but are there any real problems with it:

* Ignores user preferences about handling of target attributes
* Opens a new, blank window if the user has configured XML files to
open in a separate application
* The usual issues with new windows: http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
* I'd have concerns about the effect of doing things onkeypress
* The title attribute is redundent
* <a>Example Opens in new window</a> probably won't scan well, you
should reconsider the alt text

> I just think in a case like this it's more appropriate to open the page in a
> new window.

Users can choose to open links in new windows. If they don't know how,
then they are the most likely to be unable to cope well with author
triggered new windows.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
date: Thu, 10 Jan 2008 03:32:09 -0800 (PST)   author:   David Dorward

Re: Bit of accessibility   
On Jan 10, 10:28 pm, David Dorward  wrote:
> On Jan 10, 4:07 am, Chaddy2222 <spamlovermailbox-
>
> sicur...@yahoo.com.au> wrote:
> > > <a href="sitemap.xml" title="Opens in new window"
> > >    onclick="window.open(this.href); return false;"
> > >    onkeypress="window.open(this.href); return false;">
> > Well first things first.
> > You need to place a <noscript> tag after the script to open the new
> > browser window (otherwise nothing happens) when the user without JS
> > (including SE bots) goes to follow the link.
>
> Rubbish. User agents that don't support JavaScript will not go "There
> are JavaScript events on this element, therefore I will ignore it
> entirely". The link will just work as normal.
>
> Noscript is generally the worst option when it comes to making things
> functional without JavaScript. The normal way (for approaching a
> decade now) has been to write something that works without JavaScript,
> and then add JavaScript to override the normal functionality (as was
> done in this example).
Yes, you are correct as you offen are in such matters.
--
Regards Chad. http://freewebdesignonline.org

>
date: Thu, 10 Jan 2008 03:48:09 -0800 (PST)   author:   Chaddy2222

Re: Bit of accessibility   
On 10/1/08 11:32 am, in article
1f0e4edb-b174-4164-ad32-e5506113fee9@k39g2000hsf.googlegroups.com, "David
Dorward"  wrote:

> * The usual issues with new windows:
> http://diveintoaccessibility.org/day_16_not_opening_new_windows.html

The site you suggest says this:

"If you absolutely must open a link in a new window, explicitly warn the
reader. This is a non-optimal, compromise solution, usually brought about by
business requirements of "not being associated" with external content."

This site says "if you absolutely must...".  Not very helpful.  The decision
is left to the developer.

However:

http://www.w3.org/WAI/wcag-curric/sam77-0.htm

Doesn't pass any judgement or expect the developer to form an opinion.  It
just says "if you do it".

The site I took the method I used from is www.accessify.com.  I'm concerned
about the onkeypress thing though.  I must admit, I didn't examine the code
in great detail, I was just searching for an accessible xhtml method for
opening and new window.

-- 
Andy Jacobs
http://www.redcatmedia.co.uk
date: Thu, 10 Jan 2008 20:25:46 +0000   author:   Andy Jacobs

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us