Purple Top

I have. Today. This morning. How? I got sent a newsletter. I never subscribed to get the newsletter, but I got it in this “special” case. Why? Well, it seems a link to my JavaScript and Accessibility article has been placed in their current newsletter, and they want to make sure it’s all right with me. I don’t understand why they think that I would mind at all, since it’s just a little more publicity for yours truly, but I guess it’s wise to notify the person’s content you’re linking to anyway, which is good, because otherwise I wouldn’t have known that their current newsletter linked to my article. Anyway, thanks, my Purple Top friends.

Having said all that, there are some corrections that I want to make to my three-part series of JavaScript and Accessibility. (Updating articles after they’ve already been posted at Web Reference is a very long, difficult and, I feel, unnecessary process. For that reason, I’m making the corrections here.)

My first mistake was in this sentence: “The last DTD, the frameset DTD, is essentially the Strict DTD.” The fact is, the frameset DTD is essentially the transitional DTD. It doesn’t make sense to force strict HTML in a frameset, and there is no reason for two frameset DTD’s.

Martin Kliehm was kind enough to point out another accessible technique for opening new windows. My method, on page two of part one, is a bit different from normal, whereas his is more subtle and something probably more practical for most of the people out there.


<a href="page.html" onclick="openWin(this.href, 'myWindow',
'width=400,height=400'); return false" target="_blank" title="Open page in a new window">open page</a>

Instead of using “document.write,” Martin has used the TITLE attribute to describe the functionality of the link. Also, my method could work better by having used “this.href” like Martin, instead of outputting the same address twice (something I definitely should have seen).

Martin also pointed out that events should be device-independent, so I should also use the onFocus and onBlur events in addition to the onMouseOver and onMouseOut events.

In part three, the DHTML menu that I explained is not 100% accessible, according to Mr. Glen Hennessee, a Web Reference.com reader who sent me an email on the subject. He claims that in order for the menu to be completely accessible, it must be navigable without any kind of pointing device (e.g., a mouse). Keyboard navigation with the menu doesn’t work on submenu items. The solution to this would be to add the :focus pseudo-class and have it operate the same way that the :hover pseudo-class does. I haven’t written code for it to work like this, but I doubt it’s very difficult, since I already did explain everything and how to use it. Plus, if you’re disabled in such a way that you can’t use a mouse, I think you’ll be using some sort of browser like a screen-reader or text-only browser, which would only see the unordered list.

If you’ve found other errors, please let me know about them, so that I can explain them better. Thanks for reading!

Newsvine | Del.icio.us | Digg
In Web, JavaScript, Accessibility on May 24th, 2005 | No Remarks

No Remarks to “Purple Top”

  1. David remarks:

    Oops, you just used target with a strict DTD.

    IMO the best way to open a popup is like so:<a href="page.html" onclick="window.open(this.href);return false">Page</a>

    It gets around pop-up blockers because the window.open is in the onclick event handler itself and not in some function and it will still work for non-JS browsers.

  2. Jona remarks:

    Oops is right! Sorry, Dave, that wasn’t supposed to be a link — it’s supposed to show actual code. I think it will make more sense now if you read it.

  3. David remarks:

    Hmm, just noticed another thing, you could use lower case event handlers to make it compatible with XHTML markup.

Leave a Remark

 

Note: HTML is allowed. (<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> ).