YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  [ 4 posts ]

Matt M

  • Username: mmckeon
  • Joined: Fri Sep 04, 2009 6:42 am
  • Posts: 44
  • Offline
  • Profile
Tags:

Removing Focus on Selected Items in Carousel

Post Posted: Tue Nov 24, 2009 9:32 am
+0-
Does anyone know if there is a way to stop the carousel from "focusing" on the active/selected item. I'm trying to avoid the outline around the selected item which is something I can't style/remove. Thanks.

Todd Kloots

YUI Developer

  • Username: kloots
  • Joined: Fri Nov 28, 2008 4:09 pm
  • Posts: 41
  • YUI Developer
  • Offline
  • Profile

Re: Removing Focus on Selected Items in Carousel

Post Posted: Tue Nov 24, 2009 10:41 am
+0-
Hi Matt -

The active/selected item is focused for accessibility. Therefore, not focusing it wouldn't make for the best user experience for those who use the keyboard to navigate a carousel, such as users of screen readers. Additionally, removing the focus outline entirely is a bad idea as well for the same reason -- the focus outline lets users navigating via the keyboard know where they are relative to the other items in the carousel. Can you provide more detail regarding why you wish to remove the focus outline? If it is that you simply don't like the look of it, can I suggest that you provide a custom focus style that is inline with your design needs? That way, users of the keyboard still get focus feedback. If you need help in how to implement a custom focus style let me know and I'll be happy to help.

- Todd

Matt M

  • Username: mmckeon
  • Joined: Fri Sep 04, 2009 6:42 am
  • Posts: 44
  • Offline
  • Profile
Tags:

Re: Removing Focus on Selected Items in Carousel

Post Posted: Tue Nov 24, 2009 9:05 pm
+0-
I think I phrased my question poorly. I wasn't looking for a way to remove the "selected item" outline entirely, but merely restyle it from the boring, system looking dotted line to some other style. We fixed this by setting outline-style: none, and styling yui-carousel-item-selected to our liking.

Is this how you would have implemented a custom focus style?

Todd Kloots

YUI Developer

  • Username: kloots
  • Joined: Fri Nov 28, 2008 4:09 pm
  • Posts: 41
  • YUI Developer
  • Offline
  • Profile

Re: Removing Focus on Selected Items in Carousel

Post Posted: Wed Nov 25, 2009 10:28 am
+0-
Hey Matt,

Yeah, providing a custom focused style is definitely the right approach, as is the approach to your implementation.

- Todd
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum