www.webdeveloper.com
Results 1 to 6 of 6

Thread: Disabling Firefox Focus Rectangle

  1. #1
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    51

    Disabling Firefox Focus Rectangle

    When setting the tabIndex property for an element, Firefox also displays, like IE, a dotted rectangle around the focussed element. With IE you can set hideFocus=true, which does not work with Firefox.

    How do I hide the focus rectangle for Firefox?

    Thanks in advance...

  2. #2
    Join Date
    Mar 2005
    Posts
    767
    With CSS: :focus { outline: none }
    Stop thinking, start drinking.

  3. #3
    Join Date
    Aug 2007
    Location
    Somewhere in the vicinity of Betelgeuse
    Posts
    194
    Orc Scorcher, I did not know that. Seriously, I did not.
    Not one shred of evidence supports the notion that life is serious.
    eternal.co.za - code, thoughts, rants and raves
    f1rivals.net - formula 1 forums, and, hopefully, soon, prediction game

  4. #4
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    51
    Thanks for the tip. It worked perfectly for my scenario.

  5. #5
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Of course then people who don't use a mouse have no way to tell where they are on the page when they try to interact with the page from their keyboard. That code definitely reduces your audience as accessibility is greatly reduced when you use it.
    Stephen

  6. #6
    Join Date
    May 2010
    Posts
    1

    thanks! handle focus rect hiding with care

    very helpful, i love this forum and the internet :-)

    felgall, I totally agree with you that hiding the foccusrect must be done really carefully, accessibility relies heaviliy on visualisation of this rect. Handled with care this possibility is fine I think.

    In my case for instance, I created a form system that visualizes the focused element with borders and backkgrounds, and there the focusrect interferes with my stlye. Moreover, focusrect in ff is a dotted line while in chrome it is a solid orange rect, so for getting stylish this is problematic.

    have some great days out there,
    cheers
    thomas

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