Skip to content

fix(infieldbutton): no outline on focus-visible #2288

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

Merged
2 commits merged into from
Dec 15, 2023

Conversation

mdt2
Copy link
Collaborator

@mdt2 mdt2 commented Nov 10, 2023

Description

Addresses issue #2232. Per the spec files, the In-field Button component shouldn't have an outline on keyboard focus. Keyboard focus also looks the same as hover focus for this component.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps @jenndiaz

  1. Open the component in the docs site
    • When you tab through to apply keyboard focus, you should not see an outline
    • Keyboard focus should look the same as the hover state
  2. In the docs site, turn on WHCM
    • You should see a border with the Highlight color when:
      • Tabbing with keyboard
      • You click and the button is active
      • You hover a button
    • You shouldn't see a border on hover, active, or focus on disabled infield buttons
    • The border should have the same border radius as the component does when it's not hovered/focused/active
  3. Open the component in Storybook
    • When you tab through to apply keyboard focus, you should not see an outline
    • Keyboard focus should look the same as the hover state

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch 2 times, most recently from 9e6a908 to 59af790 Compare November 10, 2023 15:01
Copy link
Contributor

github-actions bot commented Nov 10, 2023

🚀 Deployed on https://pr-2288--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Nov 10, 2023

File metrics

Summary

Total size: 3.97 MB*
Total change (Δ): ⬇ 1.05 KB (0.03%)

Package Size Δ
infieldbutton 18.37 KB 🚨 deleted, moved, or renamed
Details

infieldbutton

File Size Base Δ
Total 18.72 KB 18.37 KB ⬇ 0.36 KB (1.86%)
index-base.css 16.57 KB 16.22 KB ⬇ 0.36 KB (2.10%)
index-theme.css 2.72 KB 2.72 KB -
index-vars.css 18.72 KB 18.37 KB ⬇ 0.36 KB (1.86%)
index.css 18.72 KB 18.37 KB ⬇ 0.36 KB (1.86%)
mods.json 2.16 KB 2.16 KB -
themes/express.css 1.64 KB 1.64 KB -
themes/spectrum.css 1.08 KB 1.08 KB -
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@mdt2 mdt2 requested review from pfulton, jawinn and jenndiaz November 10, 2023 15:26
@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 6af1a8a to 70bbf58 Compare November 14, 2023 14:15
@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 675de2d to 8cc732b Compare November 21, 2023 16:23
Copy link
Contributor

@jenndiaz jenndiaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pfulton pfulton requested a review from Westbrook December 1, 2023 16:06
@pfulton
Copy link
Collaborator

pfulton commented Dec 1, 2023

@Westbrook mind taking a quick look at this one? Thanks!

@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 8cc732b to 117f1ac Compare December 5, 2023 14:14
Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pfulton pfulton force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 117f1ac to 8562cfc Compare December 11, 2023 21:31
@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 8562cfc to 1dda12e Compare December 13, 2023 20:44
@mdt2 mdt2 mentioned this pull request Dec 13, 2023
14 tasks
@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 1dda12e to 5a8c3bb Compare December 14, 2023 16:23
@mdt2 mdt2 force-pushed the mdt2/css-632-infield-focus-outline-shape branch from 5a8c3bb to d3a131a Compare December 15, 2023 16:34
@pfulton pfulton closed this pull request by merging all changes into main in 8172ec9 Dec 15, 2023
@pfulton pfulton deleted the mdt2/css-632-infield-focus-outline-shape branch December 15, 2023 21:11
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

Successfully merging this pull request may close these issues.

[In-field Button]: Focus loupe does not conform to the shape of the button
4 participants