Skip to content

feat: add hide-label-visually prop for scale-date-picker and scale-textarea#2468

Closed
tibisabau wants to merge 2 commits intotelekom:mainfrom
tibisabau:feat/add-hide-label-prop-date-picker-text-area
Closed

feat: add hide-label-visually prop for scale-date-picker and scale-textarea#2468
tibisabau wants to merge 2 commits intotelekom:mainfrom
tibisabau:feat/add-hide-label-prop-date-picker-text-area

Conversation

@tibisabau
Copy link
Copy Markdown
Contributor

Description

Added support for the hide-label-visually prop to both scale-date-picker and scale-textarea components. This prop allows labels to be visually hidden while remaining accessible to assistive technologies, ensuring compliance with accessibility best practices.

The implementation follows the existing pattern used in other Scale components like scale-text-field and scale-dropdown-select, using visibility: hidden on the label element to maintain accessibility while hiding the visual representation.

Closes #2441.

Checklist if Applicable

  • The tests passed
  • Linting passed
  • Documentation has been added
  • CHANGELOG.md has been updated

Copilot AI review requested due to automatic review settings February 27, 2026 16:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for the hideLabelVisually prop to the scale-date-picker and scale-textarea components, allowing labels to be visually hidden while maintaining their association with the input elements for assistive technologies. This feature already exists in other Scale components like scale-text-field and scale-dropdown, and this PR extends it to these two additional components to provide consistency across the component library.

Changes:

  • Added hideLabelVisually boolean prop to both scale-date-picker and scale-textarea components
  • Implemented CSS rules to hide labels using visibility: hidden when the prop is enabled
  • Applied the hide-label CSS class conditionally based on the prop value

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/components/src/components/textarea/textarea.tsx Added hideLabelVisually prop declaration and applied corresponding CSS class
packages/components/src/components/textarea/textarea.css Added CSS rule to hide the label when textarea--hide-label class is present
packages/components/src/components/date-picker/date-picker.tsx Added hideLabelVisually prop declaration and applied corresponding CSS class
packages/components/src/components/date-picker/date-picker.css Added CSS rule to hide the label when scale-date-picker--hide-label class is present

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amir-ba
Copy link
Copy Markdown
Collaborator

amir-ba commented Apr 8, 2026

will close due to it being duplicate of #2471

@amir-ba amir-ba closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add hide-label-visually=true prop for scale-date-picker and scale-textarea

3 participants