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

Add (standard) focus styles to all “Select” buttons on domain picker #99314

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

adamwoodnz
Copy link
Contributor

@adamwoodnz adamwoodnz commented Feb 5, 2025

Fixes https://github.com/Automattic/dotcom-forge/issues/10405

Proposed Changes

  • Remove custom focus styles from domain selector elements to allow base focus styles to appear

Once these custom styles have been removed we can move onto updating the base styles across the app in https://github.com/Automattic/dotcom-forge/issues/10406

Note that the focus rings use --color-primary: var(--studio-blue-50); which is still the old WordPress blue, until #99033 lands and updates it to the modern WordPress blue (Blueberry).

calypso localhost_3000_setup_onboarding_domains(Desktop) (1)

Why are these changes being made?

  • It's important for interactive elements to have focus styles for accessibility reasons.

Testing Instructions

  • Navigate to http://calypso.localhost:3000/setup/onboarding/domains
  • Enter a search term and wait for the list of options to be populated
  • Use the tab key to move through the page focusing the interactive 'Select' button elements
  • Observe that all buttons in the page have matching visible focus styles

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@adamwoodnz adamwoodnz self-assigned this Feb 5, 2025
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@adamwoodnz adamwoodnz changed the title Remove custom focus styles from domain selector elements Add (standard) focus styles to all “Select” buttons on domain picker Feb 11, 2025
@adamwoodnz adamwoodnz marked this pull request as ready for review February 11, 2025 03:37
@adamwoodnz adamwoodnz added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Accessibility (a11y) [Feature] Domain Purchases Tools related to purchasing and mapping new domains. [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR labels Feb 11, 2025
@github-actions github-actions bot added the [Status] Design Input Requested Label automatically added to PRs where design feedback is requested label Feb 11, 2025
@jasmussen jasmussen self-requested a review February 11, 2025 08:48
Copy link
Member

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

Nice one. Lots of red, that's the right way to do it!

Note that the focus rings use --color-primary: var(--studio-blue-50); which is still the old WordPress blue, until #99033 lands and updates it to the modern WordPress blue (Blueberry).

Correct, thank you for keeping this in mind.

The following is almost certainly unrelated, but in testing this PR out locally, I'm missing the site title column in my Sites list:

Screenshot 2025-02-11 at 09 57 40

It's likely an env thing. I don't see how this CSS could affect that, but mentionining regardless.

Also separate, but these buttons still don't have focus styles:

Screenshot 2025-02-11 at 09 58 43

I can confirm the focus styles are now visible and Calypso-generic in these two important places:

Screenshot 2025-02-11 at 09 59 02

state

This one still has a custom one:

Screenshot 2025-02-11 at 09 59 41

There's one small regression, it's unclear how this PR could've caused it, or if this is a trunk thing. But notice now that there's a white background behind the label here, even though the onboarding flow overall has a light gray background:
Screenshot 2025-02-11 at 09 59 24

Can you tell what that is?

@adamwoodnz
Copy link
Contributor Author

This one still has a custom one:

Screenshot 2025-02-11 at 09 59 41

Yes, I considered including the search input, but decided to scope this PR to just the buttons, as we have this separate issue for standardizing button and input focus styles.

@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented Feb 11, 2025

There's one small regression, it's unclear how this PR could've caused it, or if this is a trunk thing. But notice now that there's a white background behind the label here, even though the onboarding flow overall has a light gray background: Screenshot 2025-02-11 at 09 59 24

Can you tell what that is?

This one is interesting. I can't repro (can't see a white background) in dev, staging or the testing link, but looking at the shape in your screenshot it looks like it would be the .card.logged-out-form:

Screenshot 2025-02-12 at 12 25 16 PM

@adamwoodnz
Copy link
Contributor Author

adamwoodnz commented Feb 13, 2025

This one is interesting. I can't repro (can't see a white background) in dev, staging or the testing link, but looking at the shape in your screenshot it looks like it would be the .card.logged-out-form:

I have managed to reproduce this in a new branch, so I'll create a new issue and PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) [Feature] Domain Purchases Tools related to purchasing and mapping new domains. [Status] Design Input Requested Label automatically added to PRs where design feedback is requested [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants