Skip to content

Navigation block: Improve the wavy underline for dark backgrounds #68942

Open
@afercia

Description

Description

Splitting this out from #68628

When an item in the navigation block misses the link, a grammar-like 'wavy underline' is shown as visual indicator for the items that needs attention. This was introduced in #32512 and then refined in #34954 which made the underline blue.

#68628 make the underline red for the 'invalid' and 'draft' cases.

However, neither the original implementation nor #68628 took into consideration themes with a background color other than white or light color, where the wavy underlines may be barely visible.

Screenshot with Twenty Twenty-Four set to the 'Maelstrom' variation. Observe the blue outline of the 'Add link' default placeholder is barely visible. Similarly, the red underline for Invalid / Draft may be barely visible with other background colors.

Image

I haven't tested it but I guess the underlines are not visible in Windows High Contrast Mode. I don't think it's an accessibility issue though because the underline is an additional visual indicator. The missing / invalid / draft states are already communicated with the palceholder text or visible label.

The current wavy underline styling could benefit from some improvements for dark background colors though.
Cc @WordPress/gutenberg-design

Step-by-step reproduction instructions

  • Use Twenty Twenty-Four set to the 'Maelstrom' variation.
  • Edit a navigation block and add an item without a link.
  • Observe the blue wavy underline is barely visible on top of the blue background.
  • To reproduce the Draft and invalid cases:
    • Add a link to an existing, published page and save.
    • In the WP admin, switch the linked page to be a Draft.
    • Refresh the editor and observe the draft state with a red underline.
    • In the WP admin, move the linked page to the trash.
    • Refresh the editor and observe the invalid state with a red underline.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Assignees

No one assigned

    Labels

    Needs DesignNeeds design efforts.[Block] NavigationAffects the Navigation Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions