W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2001

Re: lights are on, no one's in.

From: Jim Ley <jim@jibbering.com>
Date: Wed, 7 Nov 2001 12:13:18 -0000
Message-ID: <024401c16785$97fc7320$ca969dc3@emedia.co.uk>
To: <w3c-wai-ig@w3.org>
"Jonathan Chetwynd":
> One can check if the user agent supports a given snippet.
> However is there anyway to check if the user has access to a given i/o
> device?
>
> ie a mouse, mousewheel, etc

Of course not, and even if there was, there's no way to tell if they
actually are actually able to use the one they have got.   The most you
can do is check to see if the UA supports things, but that's no guarantee
that the user can (or even the actual system, consider Jaws, it changes
radically how IE works).  Anything that you need to know about a user
cannot be gained by a computer, and I would also oppose anything that
went in this direction (it's putting an undue burden on users to describe
their situation, whilst I'm very keen on educating users, I don't think
it's feasible.)

You just need to ensure that even if it's there but there's no mousewheel
it is still usable.

> My current project is designing a toolbar.
> If a mousewheel is available many of the options are hidden, if not
they are
> shown.(hence)
> This dramatically effects the GUI.
>
> The pre-beta, is here: http://www.peepo.com/2k1/mousewheel/

Please start off with good scripting techniques, try and get into the
habit of using object detection. IIRC Konquerer supports mousewheel and
document.all, but I'm pretty sure it will error on your script. and
onload="defaultEvents" doesn't do what you think...

This is better - also remember that all browsers which support mousewheel
also support at least a subset of HTML DOM1/2 so using these will future
proof your code rather than the obsoleted (and slow) document.all
approach.

var ImageNumber = 1;
function shiftUpDown() {
  d=document
  ImageNumber = countRotations(ImageNumber);
  if (objImage && objHref && d.images && d.links) {
   objImage.src=d.images[ImageNumber-1].src
   objImage.alt=d.images[ImageNumber-1].alt
   objHref.href=d.links[ImageNumber+1].href
   window.status=objImage.alt
  }
  return false;
}


function countRotations(addRotations) {
  if (event && Number(event.wheelData)==event.wheelData) {
   addRotations += event.wheelDelta/120;
  }
  return addRotations;
}
Received on Wednesday, 7 November 2001 07:14:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:13:58 GMT