Christian Heilmann

PureDOMExplorer update – what is Safari’s issue with Off-Left?

Monday, February 13th, 2006 at 9:40 am

I just decided to celebrate the sale of a commercial license for my tree menu script pureDOMexplorer by creating a new version, which fulfils the change requests I had in the past. The new version of pde now

  • turns a nested list with the class “pde” into a tree menu – which means you can use it more than once on a page
  • uses fully unobtrusive JavaScript, including addEvent and encapsulation of all functionality in one pde object.
  • creates collapse and expand links and allows the section links to link to a landing page
  • allows for both keyboard and mouse to expand the sections (I still have to fix the tabbing issue over hidden elements)
  • keeps all the look and feel in the CSS - you don’t need to know JavaScript to change the look and feel
  • does not collapse lists that contain a STRONG element – to allow for a “you are here” state in your trees.

You can check and see the new version at the new pureDOMExplorer demo page

Now, it all works fine in MSIE/Opera/Firefox on PC, but on Safari I cannot make the hiding and showing to work without resorting to the inaccessible display block/none solution.

Currently my demo CSS uses the “Off Left” technique, as recommended to be most accessible :

/* The class to hide nested ULs */

/* The class to show nested ULs */

Ingo Chao took on the challenge and fixed the Safari issue. All working fine now.

Following the requests in the comments to make the parent link also collapse and expand the nested list, I changed the script and added a new parameter called linkParent. If the parameter is false the parent link will point to the document it links to, if it is true, it will collapse and expand the same way the arrows do.

Share on Mastodon (needs instance)

Share on Twitter

My other work: