Skip to content

chore: minor improvements to focus state #7611

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
merged 4 commits into from
May 17, 2024
Merged

chore: minor improvements to focus state #7611

merged 4 commits into from
May 17, 2024

Conversation

hbuchel
Copy link
Contributor

@hbuchel hbuchel commented May 17, 2024

Description of changes:

There are some cases where our focus indicator might be a little more difficult to discern when it is used on our buttons that have a solid colored background (like the "Get started" button on the home page). This updates the focus indicator to be an outline offset by 2px across our button styles so the indicator is easier to differentiate (or fixes some instances where it just looks a little weird). In most cases it's just moving the indicator to :focus-visible and adding a 2px offset and removing the box-shadow (in favor of outline).

Updates are mostly visible for:

  • Skip to main link
  • Get started buttons/popover triggers
  • Copy code button at the top of code blocks
  • the Feedback yes/no buttons
  • Anywhere an Amplify UI button style is used

https://expandedfocus.d2bfwhpcsj9awv.amplifyapp.com/

Before After
Screenshot 2024-05-17 at 11 59 28 AM Screenshot 2024-05-17 at 11 59 21 AM
Screenshot 2024-05-17 at 12 00 49 PM Screenshot 2024-05-17 at 12 00 56 PM
Screenshot 2024-05-17 at 12 01 33 PM Screenshot 2024-05-17 at 12 01 41 PM
Screenshot 2024-05-17 at 12 14 06 PM Screenshot 2024-05-17 at 12 13 42 PM
Screenshot 2024-05-17 at 12 25 40 PM Screenshot 2024-05-17 at 12 25 15 PM
Screenshot 2024-05-17 at 12 27 21 PM Screenshot 2024-05-17 at 12 27 12 PM

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -3,6 +3,7 @@
&__link {
color: inherit;
text-decoration: none;
border-radius: var(--amplify-radii-small);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just to make the outline rounded to match the rounded card.

@hbuchel hbuchel marked this pull request as ready for review May 17, 2024 16:49
@hbuchel hbuchel requested a review from a team as a code owner May 17, 2024 16:49
@hbuchel hbuchel merged commit fccd401 into main May 17, 2024
10 checks passed
@hbuchel hbuchel deleted the ExpandedFocus branch May 17, 2024 18:13
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.

3 participants