dcsimg
www.webdeveloper.com
Results 1 to 11 of 11

Thread: Does hover only work for links?

  1. #1
    Join Date
    May 2004
    Posts
    442

    Does hover only work for links?

    I seem to remember reading once that hover was only implemented with IE for links, but I am not sure I am up to date on that one. Is there anything else it can be used for?

  2. #2
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    It's a psuedo-class that makes it work, and IE only recognizes pseudo-classes when used upon anchors (links). I do not beleive that there is any way around that, unless one maybe used some kind of script, but then it wouldn't really be a psuedo-class anymore..

  3. #3
    Join Date
    May 2004
    Posts
    442
    Shame, eh?

  4. #4
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    I guess that it must have to do with intuitive resultant action: if you hover the pointer-tool over something and it changes appearance, the expectation is that if the subject matter (text, whatever) changes on-hover, that it leads somewhere and one tends to want to 'click' the pointer-tool. I took part in a small online study on useability standards that did something like that... you chase little objects and small snippetes of text around the screen and if you 'hover' over any one of them, they stop moving and that is supposed to be "the test" except you find yourself clicking once, twice, again and again and only then remember that there is no further action expected. The little object is stationary and stays that way but you still expect some further action to occur..
    It is to remind yourself how someone whom is blind or visually-handicapped probably reacts to unexpected behavior on a web page, analogous I suppose to (a sighted person) walking into a dark room and turns on the lightswitch and the light doesn't come on, -you probably flip the switch off-on-off-on a few more times by sheer reaction of disbelief... -just to be sure. That was the point of the test. Intuitive expectant reaction.
    For as reviled as IE is with most coder-purists for it lax and unsupported standards, I tend to slightly side with IE on this little quirk... (although I might not feel that way if I needed this effect for some other legitimate reason and couldn't get it to work..)
    -J
    Last edited by WebJoel; 07-29-2006 at 09:38 AM.

  5. #5
    Join Date
    Nov 2002
    Location
    Nashua, NH
    Posts
    3,195
    Joel, your logic is flawed. "Leads somewhere" is not the only action possible. You can click on buttons which leads to form submission - IE did not offer :hover for it. Any form element can be acted upon (its value can be changed) so they also deserve :hover action. How about the cascading menus (see www.vladdy.net/demos/cssnav.html for example) - they rely on having hover supported on <li> elements - and you get plenty of action there. What about supporting hover over labels since clicking on the label should put focus on the related form element? Oh never mind MS never bothered implementing this basic usability feature.... Finally, almost any html element can have onclick event evoking some sort of action does not that call for supporting :hover as well?
    MS was (and I thisk still is) part of the W3C commitee and participated in developing the standards. Do not excuse their non-conformance with their desire to make the web pages more accessible - that is responsibility of web developers.

    Anyhow, this should not be that big of a deal, since there is an easy workaround for that IE stupidity: www.vladdy.net/demos/iepseudoclassesfix.html

  6. #6
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Quote Originally Posted by Vladdy
    Joel, your logic is flawed. "Leads somewhere" is not the only action possible. ....
    Point taken. Substitute "does something" for "leads somewhere". That is what I meant to say. I didn't mean hyperlink-jump to some URL, and should have so stated.
    Submitting a form "does something", I agree wholeheartedly. It's just my vernacular language that might be the reason for the confusion.
    And some hover-effect would support the intuitive belief and expectation that 'left-click' does something. I don't see where you feel that my logic is flawed. I do seem to agree with your comments.
    And yes, there are workarounds. I deal with them more than occasionally myself. And nearly all of them are to do with IE. There are some Mozilla and Fx issues, but mostly it's IE that I run into (I mean, 'encounter'. I do not physically collide with them..).
    Thanks for the imput.

  7. #7
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    As much as I love bashing Microsoft, the CSS1 recommendation ties these pseudo-classes directly to the anchor tag.

    2.1 Anchor pseudo-classes

    User agents commonly display newly visited anchors differently from older ones. In CSS1, this is handled through pseudo-classes on the 'A' element:

    A:link { color: red } /* unvisited link */
    A:visited { color: blue } /* visited links */
    A:active { color: lime } /* active links */

  8. #8
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Quote Originally Posted by ray326
    As much as I love bashing Microsoft, the CSS1 recommendation ties these pseudo-classes directly to the anchor tag.
    I guess that this is what I meant. I occasionally used psuedo-class for links (I feel, as they were intended??), ever mindful of the possible horrid color-on-color possibilities and while I do like the visual stylings of tabular text that, on-hover, highlight specific rows and/or cells, to me, this does very little except tease me. Eye candy. While I do like it, -I just don't use it myself.
    I have very little use for psudeo-class beyond anchors. I've done a few sites that have a fairly notable handicapped viewership, and formerly being 'legally blind' in one eye myself, am always noteful of and strive to include at least a few of the corrective issues pertaining to web accessibility for the handicapped. But for the magic of laser surgey four years ago, I'd still have somethng like 20/90 vision (or worse by now?) in one eye (barely correctable by wearing glasses then and virtually no night-vision whatsoever. Now, 20/25 in that eye and have 'average night-vision'. I can drive a car day/night and without glasses!).

    I did bookmark that URL provided though. Very nice effect and I could see myself using that somewhere in the future for the very same effect on some tabular data.

  9. #9
    Join Date
    Nov 2002
    Location
    Nashua, NH
    Posts
    3,195
    Quote Originally Posted by ray326
    As much as I love bashing Microsoft, the CSS1 recommendation ties these pseudo-classes directly to the anchor tag.
    CSS level 2 has become recommendation over 6 years ago: http://www.w3.org/TR/1998/REC-CSS2-19980512/
    and that specification does not restrict application of the dynamic pseudo-classes to anchors:
    http://www.w3.org/TR/1998/REC-CSS2-1...pseudo-classes

  10. #10
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Yes, and MS is populated by lazy, scum of the earth programmers but I'm sure the CSS 1 recommendation is the reason decrepit old IE 6 gets that wrong today.
    Last edited by ray326; 07-30-2006 at 11:20 PM.

  11. #11
    Join Date
    Nov 2002
    Location
    Nashua, NH
    Posts
    3,195
    Compare two dates: Release of CSS 2 as recommendation and release of IE6.0

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles