Skip to content

Label with required prop creates extra vertical scroll #4306

Open
@dairdr

Description

@dairdr

Description

Description:
When the Label component is used with the required prop as true (<Label required />), an child element in the Label, like the red dot creates an extra element as child that it seems to be for screen readers and push extra space to the bottom of the parent so a scroll is created.

Before scroll:
Image

After scroll:

Image

Link to Reproduction

https://codesandbox.io/p/sandbox/upbeat-hill-l6jjwy

Steps to reproduce

  1. Go to the Code Sandbox link.
  2. Open the Preview in a separated window so you can control all the viewport.
  3. Resize the viewport to the size of an iPad Air or use 1180x820
  4. Try to scroll/swipe down in the footer container.

Paste Core Version

latest

Browser

Google Chrome Version 135.0.7049.42 (Official Build) (arm64)

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

  • This is the link provided by Code Sandbox to the Preview Only option https://l6jjwy.csb.app
  • If you remove the width or height CSS rule from the Culprit element, the issue is gone.
  • Possible solution is to add the top: 0; CSS rule to the Culprit element and add position: relative; to its parent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Active DiscussionThis discussion is still in progressArea: ComponentsRelated to the component library (core) of this systemFix/Change in BacklogDSYS has acknowledged this improvement and will update the thread with results when we prioritize itType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions