Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a onfocus element.blur behavior

    i'm sure its been thought of before and i'm sure this is just gunna piss off the people who like to tab through their pages, but i just made a little behavior component file that stops any links from gaining focus on your page.

    put this is the style section of your page.

    Code:
    <style type="text/css">
    a { behavior: url("hidefocus.htc"); }
    </style>
    then put the attached file in the same dir. (hidefocus.htc) this is all it is

    Code:
    <public:component>
    <public:attach event="onfocus" handler="blurry" />
    
    <script>
    function blurry() {
          element.blur();
       }
       
    </script>
    </public:component>
    Note: since this behavior is stored in an external file, sometimes one instance of link focus can occur before the htc file can be loaded. if anyone has any tips on fixing that i'd like to hear'em.
    Attached Files Attached Files

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: a onfocus element.blur behavior

    Originally posted by Shecky
    if anyone has any tips on fixing that i'd like to hear'em.


    My tip would be don't use it at all. If you want to hide the focus-border you must only ever do it with click or mousedown/up events; never with focus.

    Sorry - my anger is not directed at you or anyone specifically - but I get annoyed by this kind of anti-accessibility scripting; it's the exact opposite of the kind of coding practise I'm trying to encourage. This would be infinitely better:

    <public:attach event="onmousedown" handler="blurry" />
    <public:attach event="onmouseup" handler="blurry" />

    Unplug your mouse. Try working without it. Then you'll see.
    Last edited by brothercake; 03-11-2003 at 06:38 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a mouse abused you as a child, didnt it?

    WOAH...

    oh brothercake, how many coding jams have you helped me out of? ...and now this... THIS!!! Are you from a country where mice are considered sacred and you can't touch them?

    I'm not sure about you anti-mouse people... it was created for a reason you know. The mouse wheel, especially! For what reason do you feel the tab button is more functional than a wheel and a pointer?

    Everyone and their mother tabs through forms, this type of thing which requires one to type... i'm sorry if you're one of the few who has to tab through EVERY page, and who winces when your fingers have to leave the home row

    To be fair i also didnt take into consideration anyone who uses a browser other than IE, so there ya go. Broad based discrimination. (That probably didnt help my case.)

    I don't believe i'll be unplugging my mouse unless i feel like roughing it for a few days.. eh, or... maybe... it is lent and all. Now if someone starts messing with my onmousewheel function, then theres hell!!!!!!!!!!

    btw, onmousedown and onmouseup are too slow from a timing standpoint to totally eliminate the ugly outline. so nah. This is meant for a person who USES onfocus="blur(this)" and doesnt like to type it out for every single link. There are a lot of us, sorry...

    and now that i've started some sort of onholy focus war, i shall run off and hide until brothercake and his clan come back and give me what for.

    (press [TAB] nine times to go to the submit reply button, please.)

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    It's not about what I like ..

    Originally posted by Shecky
    For what reason do you feel the tab button is more functional than a wheel and a pointer?
    How about - for people who can't use a mouse ...

    My suggestion you unplug your mouse is so you can empathise with those people; understand how they navigate websites so you can allow for this in your coding practise.

    Don't get stressed though - I'm not having a go at you. But this is important - hence the strength of my response
    Last edited by brothercake; 03-11-2003 at 08:03 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Re: a mouse abused you as a child, didnt it?

    Originally posted by brothercake
    How about - for people who can't use a mouse ...

    My suggestion you unplug your mouse is so you can empathise with those people; understand how they navigate websites so you can allow for this in your coding practise.

    Don't get stressed though - I'm not having a go at you. But this is important - hence the strength of my response
    If you're going to place special consideration on these people, you may as well code all of your web pages with.. i dunno... netscape 2 in mind.

    Theres that old saying, you cant please everybody all of the time. To the people who can't use a mouse but for some reason can use a keyboard, i'm very sorry... but only in a symbolic sense.

    Short of stephen hawking coming to my door and having his goons beat it out of me, i think i'm gunna stick with eliminating focus on links.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Shecky
    If you're going to place special consideration on these people, you may as well code all of your web pages with.. i dunno... netscape 2 in mind.
    Exactly

    Accessibility in no way implies a reduction in functionality; it's all about how you apply that functionality so that it degrades gracefully.

    Netscape 2 is an excellent test browser; with an XHTML+CSS paradigm there's no reason why you can't make the eye-candy all-singing all-dancing site you want, that is *still* basically coherent, legible, navigable and useable in the most basic of web browsers, all the way back to Lynx.

    Sure it won't look the same, but it doesn't have to; equivalency does not mean equality.

    Originally posted by Shecky
    i'm very sorry... but only in a symbolic sense.
    I'm not sure what you mean by this. You don't have to make your site accessible if you don't want to. What I don't understand is why you wouldn't want to; why not make the best possible website you can? Because you don't like dotted lines ..?

    Is your website just for you? If it is, then fair enough; forget everything I've said. If not ... well ... accessibility is not just about disabled people; it's about everyone.

    I could ramble on forever ...
    Last edited by brothercake; 03-11-2003 at 09:05 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #7
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry

    Shecky has issued this official response:

    [statement]
    to which he would like to add "so bleh on you" and "you smell"

  • #8
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Just skimming through this thread, there are two distinct things at work:

    1. You don't like dotted lines
    2. You disable focusing

    Taking care of #1 does not require performing #2.

    Just because focusing causes "ugly" (your opinion) dotted lines doesn't mean you should disable focusing. Rather, why not change the focus indication?

    a:focus {
    outline: black solid 1px;
    }

    For a solid outline instead of a dotted one. Use -moz-outline in addition if you want it to work in Moz, as well as Opera and Konqueror.

  • #9
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by jkd

    Just because focusing causes "ugly" (your opinion) dotted lines doesn't mean you should disable focusing. Rather, why not change the focus indication?

    a:focus {
    outline: black solid 1px;
    }

    For a solid outline instead of a dotted one. Use -moz-outline in addition if you want it to work in Moz, as well as Opera and Konqueror.
    If someones goal was to not, themselves, see any dotted lines on web pages that they made, then they should take that advice.

    I want other people not to see the focus... in my own personal form of focus nazism, or something. Focus is the cause of all of our problems, and it must be eliminated!!!!

    As shocked as i am that some browsers now support that outline css style, i dont think i'll be using it for the benefit of only mozilla, opera, and konqueror users.

    I'll just make a version that hides the outline, but changes the color when focused that'll please everyone. Unless cake boy finds a problem with that too!
    seldom ruined but by myself

  • #10
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Ok guys, I know this is mostly in fun, but lets lay off the whimsical sarcasm, as it could easily be misunderstood eventually. This thread will remain open as long as any further discussion gets back on "track."
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #11
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    my two cents: no dotted lines, no focusing disabled, one single instruction

    document.onclick = self.focus;

    brothercake, as I agree with you concerning to accessibility, I think that your anger is a bit disproportionate; remember: Flash is the real enemy
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #12
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Borgtex
    my two cents: no dotted lines, no focusing disabled, one single instruction

    document.onclick = self.focus;

    brothercake, as I agree with you concerning to accessibility, I think that your anger is a bit disproportionate; remember: Flash is the real enemy
    Well it is awfully simple... if only it fit in with my blurred reich. I even redundantly added the stoptab feature, for extra spite.

    Man i hope brothercake will still help me with my coding questions after this. ::waves at BC:: dont be maaaad!
    Last edited by Shecky; 03-12-2003 at 01:01 PM.
    seldom ruined but by myself

  • #13
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Shecky
    ::waves and BC:: dont be maaaad!
    Course not It's all cool; we're just having a discussion
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #14
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, since using a DHTML behaviors is only for IE 5.5+, you might as well use another IE 5.5+ only thingie
    Last edited by beetle; 03-12-2003 at 07:51 PM.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #15
    Regular Coder
    Join Date
    Dec 2002
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yea i couldnt get hidefocus to work with it ::shrugs::

    you'll have to show me up and figure it out for my stupid ***.
    seldom ruined but by myself


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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