Making WordPress.org

Opened 2 months ago

Last modified 6 weeks ago

#8294 new defect (bug)

Photo Directory : Button label disappears on click/focus

Reported by: krupajnanda Owned by:
Priority: normal Milestone:
Component: Photo Directory Keywords: has-screenshots has-patch needs-testing
Cc:

Description

The "Contributions" and "Favorites" button text briefly disappears when the button is clicked.

Steps to Reproduce:

  1. Visit https://wordpress.org/photos/author/<authoer_name>
    E.g. https://wordpress.org/photos/author/krupajnanda/
  2. Click the Contributions button.
  3. Observe the button during the click/focus state.

Expected Result:

The button label ("Contributions"/"Favorites") should remain visible in all states (default, hover, focus, active).

Actual Result:

The text briefly disappears while the button is being clicked; leaving only the button background visible.

Attachments (2)

Screenshot.jpg (296.9 KB ) - added by krupajnanda 2 months ago.
Bug reply.png (679.0 KB ) - added by modi2918 2 months ago.

Download all attachments as: .zip

Change History (7)

@modi2918
2 months ago

#1 @modi2918
2 months ago

It's Working Properly.

#2 @tusharaddweb
8 weeks ago

  • Keywords has-patch added; needs-patch removed

I was able to reproduce this issue on my end!

When the button enters the :active or :focus state, the background turns black, but the text color doesn't update to contrast it. This makes the text momentarily invisible, leaving just the black background box.

Since these buttons are using the .is-style-button-list navigation block, we can easily fix this by explicitly setting the text color for those interaction states.

Here is the CSS patch to resolve the issue:


  .wp-block-navigation.is-style-button-list .wp-block-navigation-item__content:active,
  .wp-block-navigation.is-style-button-list .wp-block-navigation-item__content:focus {
    color: #ffffff !important;
  }

#3 @mkrndmane
8 weeks ago

  • Keywords needs-testing added

Please use the existing color variables instead of hardcoded color values. This will ensure that Customizer changes are reflected automatically. Also, !important does not appear to be necessary here.

.wp-block-navigation.is-style-button-list .wp-block-navigation-item__content:active,
  .wp-block-navigation.is-style-button-list .wp-block-navigation-item__content:focus {
    color: var(--wp--custom--button--outline--color--text);
}

Version 1, edited 8 weeks ago by mkrndmane (previous) (next) (diff)

#4 @tusharaddweb
8 weeks ago

@mkrndmane Thanks for the feedback. You're right—using the CSS variable is cleaner and ensures customizer changes are reflected. Tested with var(--wp-custom--button--outline--color--text) and confirmed it resolves the issue.

#5 @tusharaddweb
6 weeks ago

The same Issue I notice on Plugin directory also and I check with above patch so it is working as excepted.

The patch is working fine.

Refer below image :

https://postimg.cc/PpGTywK9

Note: See TracTickets for help on using tickets.