Skip to content

feat: add property requiredAnnotation to disable visual indicator (*) for semantically marked required form elements #4366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

d-koppenhagen
Copy link
Contributor

Proposed changes

add property requiredAnnotation to disable visual indicator (*) for semantically marked required form elements

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (fix on existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

closes #4197 / https://github.com/db-ux-design-system/core-team/issues/580

…`*`) for semantically marked required form elements

closes #4197
Copy link
Contributor

github-actions bot and others added 2 commits June 11, 2025 20:38
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@d-koppenhagen do you follow a specific pattern with the reordering until line 35 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, I think in my IDE ordered imports are active. Should I revert this part?

Comment on lines +197 to +200
{...(getBooleanAsString(props.requiredAnnotation) ===
'false'
? { 'data-required-icon': 'false' }
: {})}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{...(getBooleanAsString(props.requiredAnnotation) ===
'false'
? { 'data-required-icon': 'false' }
: {})}
data-hide-required-asterisk={getHideProp(props.showRequiredAsterisk)}

We have already something data-hide-icon={getHideProp(props.showIcon)} for many components. I would like to stick with this format for every prop which is true at the beginning.
Furthermore, I think we should name the prop showRequiredAsterisk what do you think?

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.

Allow to not add "*" for form control labels when marked as required
3 participants