Skip to content

Tabs with longer strings may trigger horizontal scrolling of the panels they live in #62020

Open
@afercia

Description

@afercia

Description

See related #62018

As mentioned in See related #62018, limited width space and horizontal tabs aren't good friends.

When the 'Show button text labels' preference is enabled and WordPress is set to languages other than English, some tabs may use strings that are way longer than the English ones.

The tabs use a CSS flex layout that doesn't allow flex wrap.
The text inside the tabs can wrap to multiple lines but that triggers one more problem, see #62018

Horizontal scrolling is a problem for usability, readability, and accessibility as some content may be cut-off and not fully readable. Additionally, scrolling in a horizontal direction ro reveal content is a problem for keyboard users.
In general, horizontal scrolling should be prevented. Also, the editor doesn't have (yet) a 'scrollable' component that is fully accessible.

Animated GIF to illustrate the horizontal scrolling with 3 tabs in the Inspector panel and WordPress language set to German:

hscrolling german

The same problem can be reproduced with Dutch and Italian, and I guess with more languages:

dutch

italian

Step-by-step reproduction instructions

  • Switch WordPress language to German, Dutch, or Italian.
  • Go to the post editor and add a navigation block.
  • Note: the navigation block i just an example. This problem occurs wherever there are two or three tabs in a narrow panel and the tabs text contaisn long, unbreakable, words..
  • Go to Options > Preferences > Accessibility, and enable the 'Show button text labels' preference.
  • With the navigation block selected, observe the block inspector panel.
  • Move your mouse horizontally over the Inspector panel and observe the panel scrolls horizontally.
  • Alternatively, tab through the tabs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSS StylingRelated to editor and front end styles, CSS-specific issues.Needs Design FeedbackNeeds general design feedback.[Feature] Show button text labelsA preference in the Post and Site Editor that makes buttons show text instead of icons[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions