Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blue outline on slides #203

Closed
moontaekim opened this issue Nov 12, 2019 · 13 comments
Closed

blue outline on slides #203

moontaekim opened this issue Nov 12, 2019 · 13 comments

Comments

@moontaekim
Copy link

It looks like when you set dragEnabled={false} there is a blue outline when you toggle to the next page. I assume this is an accessibility feature but is there a way to get rid of this?

@bcarroll22
Copy link
Contributor

Hi @moontaekim, thanks for using Pure React Carousel!

This issue looks like a support question. As outlined in the question issue type, these types of issues will be closed because this is intended to be an issue tracker not a support forum. There are better places on the Internet to find support for questions like this.

If you'd like to request a feature or report a bug, feel free to open another issue and use the provided templates. Thanks again for using our carousel, and good luck!

@HanliTheron
Copy link

Hey @moontaekim, did you ever find a solution to this?

I know I can usually switch the blue border of by using something like:
.my-class:focus { border: none !important; outline: none !important; }
But I can't seem to get rid of this blue border.

@moontaekim
Copy link
Author

Hi there,

I was not able to figure it out. I decided to use React-Slick instead.

@HanliTheron
Copy link

Ah, thanks for the reply @moontaekim.

For others that might be facing the same problem, with the help of a colleague we were able to remove it, but it's not the cleanest solution:

The Slide component as has a .focusRing class which sets the outline. But trying to overwrite it directly or adding a new className to the Slide component and overwriting it in that class also doesn't work. This however did:

.focusRing___1airF.carousel__slide-focus-ring { outline: none !important; }

The class can be seen in the browser when a user clicks on it.

@dardub
Copy link

dardub commented Oct 11, 2020

To me this sounds like a bug or a question on a design decision.

@Vlad715
Copy link

Vlad715 commented Nov 30, 2020

@HanliTheron in my case your variant to fix this outline don't work, but I add this style to other class:
.carousel__slider { outline: none !important; }
It works fine for me))

@latachz
Copy link

latachz commented Dec 3, 2020

Hi guys!
Any idea how to hot fix it with styled components?

@Victor-Varghese
Copy link

const StyledSlide = styled(Slide)`
  display: flex;
  width: 110px;
  min-width: 110px;
  min-height: 72px;
  .focusRing___1airF.carousel__slide-focus-ring {
    outline: none !important;
  }
`;

const StyledBackButton = styled(ButtonBack)`
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  width: 24px;
  justify-content: center;
  align-items: center;
  height: 100%;
  border: 0px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  outline: none !important;
`;

u can override styles for next/back button and for slide you can overrride using the answer above @HanliTheron

@HarishTeens
Copy link

Shouldn't there be a toggle to turn this off?

@mrbinky3000
Copy link
Collaborator

@HarishTeens the outline is needed for accessibility compliance. In general, you see that same outline all over the web on form elements when you tab through, unless the author has overridden the outline in their CSS. Defeating the outline will make your carousel not compliant with current accessibility guidelines. A major reason for creating the carousel was to adhere to accessibility guidelines. Therefore, I doubt we'll add an option to turn this off anytime soon, unless guidelines change.

@HarishTeens
Copy link

Thats great @mrbinky3000 . But sadly none of the above potential fixes work me :(

@HarishTeens
Copy link

Oh my god I am sorry. There was an error with my css file. This fix .focusRing___1airF.carousel__slide-focus-ring { outline: none !important; } worked perfectly

@MARCA-Charlie
Copy link

Oh my god I am sorry. There was an error with my css file. This fix .focusRing___1airF.carousel__slide-focus-ring { outline: none !important; } worked perfectly

Simply referencing .carousel__slide-focus-ring will suffice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants