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

Technique - Two color focus indicator #583

Merged
merged 30 commits into from Jul 10, 2019
Merged

Technique - Two color focus indicator #583

merged 30 commits into from Jul 10, 2019

Conversation

alastc
Copy link
Contributor

@alastc alastc commented Jan 11, 2019

Draft technique from @DavidMacDonald, preview version.

@alastc alastc added Techniques Ready for initial review A new technique ready for +1s or itterations labels Jan 11, 2019
@detlevhfischer
Copy link
Contributor

detlevhfischer commented Jan 13, 2019

Step 1: Load a page with light and dark interactive elements and/or light and dark backgrounds

As the test should generally apply to any page I think this request is unnecessary / potentially misleading.

The thought has crossed my mind if this Technique would be more useful for authors if it demonstrated a more targeted application of that focus style - e.g., scoped to main - I guess in many cases authors opting for this approach will choose other means of indicating focus for some parts of the page, such as navigation menus.

@alastc
Copy link
Contributor Author

alastc commented Jan 14, 2019

Good points Detlev, I did a couple of updates including:

  • Changing the description to use a background color rather than contrast with the button. From testing various methods, for an color outside the component, it is the background that matters more than the color of the component.
  • Added a missing quote that sorted out the styling in the bottom half.
  • Updating the procedure to be more inline with previous examples such as G195.
  • Moved the working example into the repo.

Preview V2.

It occurred to me that this test has to be quite specific, it is not testing for 2.1.1, and we are assuming that a dual indicator has sufficient contrast, so there is no need for a specific contrast check...

@DavidMacDonald it says that you can't apply two colors via outline, you can apply multiple box-shadows, e.g. this power-focus styles gist I created for stylus.

Any objection to using something like that? We could combine it with outline rather than using multiple box-shadows if you prefer. I just thought it might be useful to apply a two-outline style approach as well as a dashed-border approach.

@DavidMacDonald
Copy link
Contributor

@alastc I added Alastair's example.

@alastc alastc added Survey - Ready for and removed Ready for initial review A new technique ready for +1s or itterations labels Jun 4, 2019
alastc and others added 9 commits June 7, 2019 00:10
Added paragraph about only using the technique on parts of the site, and updated procedure with a note about not needing to check EVERY component if the CSS is at the bottom of the cascade, overriding other classes.
@alastc alastc merged commit 5851bd1 into master Jul 10, 2019
@alastc alastc deleted the tech-focus-visible branch July 10, 2019 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants