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

Focus outlines on Invisible & Close buttons #1213

Closed
emplums opened this issue Jan 12, 2021 · 3 comments · Fixed by #1510
Closed

Focus outlines on Invisible & Close buttons #1213

emplums opened this issue Jan 12, 2021 · 3 comments · Fixed by #1510

Comments

@emplums
Copy link
Contributor

emplums commented Jan 12, 2021

Describe the bug
Today while working on adding the CloseButton into Primer React Components, I noticed that the example in Primer CSS for the .close-button class has no focus indicator:

screen shot of close button showing that there is no focus indicator

I also noticed that the invisible buttons also have no focus indicator.

To Reproduce
Steps to reproduce the behavior:

  1. Go to primer.style/css
  2. Force focus on either the invisible button or the close button
  3. See that there is no focus indicator even when navigating by keyboard + check the styles and see that both the outline and the box shadow are removed when focused

Expected behavior
All buttons should comply with WAI-ARIA 6.2 Discernible and Predictable Keyboard Focus

Screenshots
screen shot of close button showing that there is no focus indicator

@emplums emplums added this to 📮 Inbox in 🐞 Primer CSS issue tracking via automation Jan 12, 2021
@emplums
Copy link
Contributor Author

emplums commented Jan 12, 2021

Note: In PRC I went ahead and used the default box-shadow-focus for the focus indicator, if we end up deciding to use something else please ping me in this issue so I can update it in React land :)

@emplums
Copy link
Contributor Author

emplums commented Feb 16, 2021

Going to go ahead and add the default focus outline to the ButtonInvisible in PRC as well - this still needs to be updated in Figma and Primer CSS cc @ashygee and @simurai

@ashygee
Copy link
Contributor

ashygee commented Feb 17, 2021

@emplums this has been updated today in Figma

new focus states for invisible buttons show button with blue focus shadow added

I'm cheating a bit in Figma because the shadow won't show without a fill color so the bg-canvas fill has been applied to this to change with color modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants