Skip to content

fix(form): keep required asterisk from orphaning #11961

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/react-core/src/components/Form/FormGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export const FormGroup: React.FunctionComponent<FormGroupProps> = ({
<span className={css(styles.formLabelText)}>{label}</span>
{isRequired && (
<span className={css(styles.formLabelRequired)} aria-hidden="true">
{' '}
{ASTERISK}
&nbsp;{ASTERISK}
</span>
)}
</LabelComponent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exports[`FormGroup should render form group variant with required label 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`LoginForm LoginForm with rememberMeLabel 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down Expand Up @@ -69,7 +69,7 @@ exports[`LoginForm LoginForm with rememberMeLabel 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down Expand Up @@ -175,7 +175,7 @@ exports[`LoginForm LoginForm with show password 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down Expand Up @@ -219,7 +219,7 @@ exports[`LoginForm LoginForm with show password 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down Expand Up @@ -336,7 +336,7 @@ exports[`LoginForm should render Login form 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down Expand Up @@ -380,7 +380,7 @@ exports[`LoginForm should render Login form 1`] = `
aria-hidden="true"
class="pf-v6-c-form__label-required"
>
*
 *
</span>
</label>

Expand Down
Loading