SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript accessibility

    Hello - I am considering using JS to display some images on my site but I'm wondering how much I need to be concerned about those who do not have JS enabled. It's only a small personal site but a lot of the people looking at it have no vague clue what JS is so if for some reason it's disabled, they won't know what to do with it and consequently, they'll be unable to view my images.

    So question is, is this something I should be worried about or is JS enabled on virtually all (but at least most) computers? Can I just go ahead and use it?

    I'd appreciate your thoughts on that. Thanks.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Javascript is enabled for about 90% or so of browsers. A portion of those where it is not enabled are web readers etc used by blind people and people with other disabilities where Javascript is either unavailable or would make it impossible for them to track where they are on the page.

    Javascript should only be used to enhance your web site - the site should still be usable for people without Javascript. The only exception to this rule that I can think of is sites about Javascript.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much, felgall, for answering. That's just about what I thought but wasn't sure. As I said, it's only a small site but if I'm doing any web design, I'd rather do it the right way and make it accessible to all.

    Thanks!

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall
    A portion of those where it is not enabled are web readers etc used by blind people...
    For some perhaps, but it is not as common as many accessibility zealots like to make out. Most screenreader software is perfectly happy to have javascript doing stuff to the page, and will read out alerts, etc. - you just have to make sure that any updated content is coded so that screenreaders are aware of the change.

    Another common reason for having JS disabled is overly cautious sysadmins.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Buddy Bradley
    Most screenreader software is perfectly happy to have javascript doing stuff to the page, and will read out alerts, etc.
    The problem tends to be dynamic changes to the DOM tree, e.g., when using 'Ajax' to asynchronously modify the page.

    Quote Originally Posted by Buddy Bradley
    you just have to make sure that any updated content is coded so that screenreaders are aware of the change.
    Can you please explain how to do this? I read as recently as this morning that not even James 'brothercake' Edwards – who is rather good at these JavaScript and 'Ajax' thingies – knows how to make assistive technology aware of asynchronous updates. If you know how to do this, I think the whole accessibility community would be quite interested.

    Quote Originally Posted by Buddy Bradley
    Another common reason for having JS disabled is overly cautious sysadmins.
    I don't know about 'overly cautious'. The kneejerk response from Microsoft, whenever a new security hole is discovered in IE, seems to be 'disable scripting until we've figured this out'.
    Birnam wood is come to Dunsinane

  6. #6
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    Can you please explain how to do this? I read as recently as this morning that not even James 'brothercake' Edwards who is rather good at these JavaScript and 'Ajax' thingies knows how to make assistive technology aware of asynchronous updates. If you know how to do this, I think the whole accessibility community would be quite interested.
    I wasn't suggesting I had the answer, just pointing out the main drawback.

    AFAIK this is the most recent research on the subject.

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moving keyboard focus as the response of an asynchronous update seems very iffy to me. In some circumstances it's probably fine, but in others it could be disastrous (or at least extremely annoying).
    Birnam wood is come to Dunsinane

  8. #8
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by curiousn
    Hello - I am considering using JS to display some images on my site but I'm wondering how much I need to be concerned about those who do not have JS enabled.
    What do you plan on the js doing? Will the content still be accessible if js is off? If the answer to the 2nd question is yes, then there shouldn't really be a problem.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •