Hallo James,

James Jeffery:
>
>
> I have a list of links with a nested list within one for the <li>'s. The
> nested listed is hidden
> from view and made visable when the user clicks the parent <li>.
>
> It works fine, apart from for accessibility reasons how should i implement
> this list? Users
> with JS disabled but CSS enabled will see nothing, users with both will
> disabled will see
> the list. If i create the elements and insert into the DOM users without
> JS loose out. Its a
> tough one. I have an idea on how to do it to cover everyone, but it seems
> like a long process
> for something simple.
>

Diego:
well, you should inject CSS using Javascript,
(document.getElementById('foo').style....
or document.getElementById('foo').className='fooxxx' or similar aproach).

James Jeffery:

> Also i am using onclick attribute to invoke the function, should i place
> it in the href attribute
> as the href is dead anyway, it does nothing but invoke the function.
> Alternativly because its
> not a link to any resource would it be better to loose the <a> and place
> it in a <p>, personally
> it seems like im missusing an <a> element in this instance.
>

Diego:
If you use a "#" into href there are no problems but is better if the
sub-list is identified with an unique Id and the parent link points to it.
For example:

<ul>
   <li>
      <a href="#sub-ul" onclick="....">Item 1</a>
      <ul id="sub-ul">
          <li>Item 1.1</li>
          <li>Item 1.2</li>
          <li>Item 1.3</li>
          <li>Item 1.4</li>
      </ul>

But, be careful, if you handle the onclick event you should handle the
onkeypress event too to intercept the SPACEBAR and ENTER keys.

Maybe it could help you.
Good luck!
--
Diego La Monica (IWA/HWG)
Web: programmazione, standards, accessibilità e 2.0
W3C Protocols and Format Working Group member for IWA/HWG
Web Skill Profiles WG Member (http://skillprofiles.eu )

email: [EMAIL PROTECTED] - Skype: diego.la.monica
mobile +393337235382 - Web: http://diegolamonica.info - http://jastegg.it [
Le uova si sono schiuse! ]


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to