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

Create a more accessible theme with better focus indicators #14

Closed
5 tasks done
jasonwebb opened this issue Aug 17, 2020 · 6 comments
Closed
5 tasks done

Create a more accessible theme with better focus indicators #14

jasonwebb opened this issue Aug 17, 2020 · 6 comments
Labels
new feature New feature to add to the package

Comments

@jasonwebb
Copy link

jasonwebb commented Aug 17, 2020

Currently the focus indicators on the previous / next buttons and slide dots are not very ineffective for most people with vision impairments. All that happens is that their opacity is changed, but that change is very subtle and lacks an outline, border, or shadow that many people would expect.

WCAG 2.4.7 says that focus indicators must be "visible", but does a pretty bad job of defining what exactly "visible" means. Technically a subtle change in opacity might be argued as compliant with the exact wording of the guideline, but it clearly does not honor the spirit of the guideline. In a legal scenario, it could really come down to which side has the better lawyers. Why even risk it? Let's add great focus indicators so legal teams don't have to split hairs!

Unfortunately, adding effective focus indicators would be a very noticeable change that could design / dev teams that are used to the current styles. So rather than introducing these indicators to the main slick-theme.scss file, it might be a better idea to spin up an alternative stylesheet and promoting it over the original (without replacing it) for teams who want it.

  • Create a new theme source file (accessible-slick-theme.scss?).
  • Improve focus indicators for the Previous and Next buttons.
  • Improve focus indicators for the slide dots.
  • Ensure the new Sass file is built properly by all the build systems.
  • Add documentation to the main README, with installation instructions.
@LuomaJuha
Copy link

Hello, I just wanted to comment on the focus indicators of those buttons. Could there be any chance for the following: Normally outlines are always shown for focusable elements, but there could be an option to use color change instead. The outline: none causes an annoyance, where returning them to the original state of browsers requires some work.

@jasonwebb
Copy link
Author

I like that idea! I agree that the browser default focus indicators are far superior to the styles in place currently. I'd love to enable them by default, but I was concerned that there might be a lot of teams who might feel that those indicators are too disruptive to their visual design and then end up not switching to accessible-slick. Its a dumb thing to have to be concerned about, I've just seen a large number of designers who are rather touchy about those focus indicators.

I really like the idea of enabling them by default, then exposing a new setting to allow people to opt out of them and rely only on the color/size change that is there now. In the documentation for that setting there could be clear, strong language explaining the impacts on real users and the potential for an increased risk of violating WCAG 2.4.7. If you agree, I'll go ahead and build that out in a branch and we can play around with it before integrating into the main branch :)

@LuomaJuha
Copy link

Hey, that sounds great imo!

jasonwebb added a commit that referenced this issue Nov 3, 2020
@jasonwebb
Copy link
Author

I've added back browser-default focus indicators in accessible-slick-theme.scss for all interactive elements. This means that they will be enabled automatically for any devs who opt-in to the new accessible theme. If they continue to use the original theme (slick-theme.scss) nothing will change, since they may have built additional custom styling on top that we wouldn't want to break.

See the demo page to see the updated focus indicators in action: https://accessible360.github.io/accessible-slick

@jasonwebb
Copy link
Author

Theme is now complete, and documentation added to the main README. Closing!

@jasonwebb
Copy link
Author

Here's an image of two carousels side-by-side using the two themes that are available, with the differences annotated. Note that the accessible theme has better previous/next arrows (darker and consistent with the slide dots), all of the slide dots are larger with the current slide being bigger than the rest, and there are browser-default focus styles on all interactive elements.

theme-differences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature to add to the package
Projects
None yet
Development

No branches or pull requests

2 participants