File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
3
3
import { Fieldset , useCheckboxGroup } from '@digdir/designsystemet-react' ;
4
+ import cn from 'classnames' ;
4
5
5
6
import { ConditionalWrapper } from 'src/app-components/ConditionalWrapper/ConditionalWrapper' ;
6
7
import { AltinnSpinner } from 'src/components/AltinnSpinner' ;
@@ -13,6 +14,7 @@ import { useIsValid } from 'src/features/validation/selectors/isValid';
13
14
import classes from 'src/layout/Checkboxes/CheckboxesContainerComponent.module.css' ;
14
15
import { WrappedCheckbox } from 'src/layout/Checkboxes/WrappedCheckbox' ;
15
16
import { ComponentStructureWrapper } from 'src/layout/ComponentStructureWrapper' ;
17
+ import utilClasses from 'src/styles/utils.module.css' ;
16
18
import { shouldUseRowLayout } from 'src/utils/layout' ;
17
19
import { useIndexedId } from 'src/utils/layout/DataModelLocation' ;
18
20
import { useItemWhenType } from 'src/utils/layout/useNodeItem' ;
@@ -95,7 +97,9 @@ export const CheckboxContainerComponent = ({
95
97
< Fieldset . Legend className = { classes . legend } > { labelTextGroup } </ Fieldset . Legend >
96
98
) }
97
99
{ textResourceBindings ?. description && (
98
- < Fieldset . Description >
100
+ < Fieldset . Description
101
+ className = { cn ( { [ utilClasses . visuallyHidden ] : overrideDisplay ?. renderLegend === false } ) }
102
+ >
99
103
< Lang id = { textResourceBindings ?. description } />
100
104
</ Fieldset . Description >
101
105
) }
Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ export const InputVariant = ({
133
133
id,
134
134
'aria-label' : langAsString ( textResourceBindings ?. title ) ,
135
135
'aria-describedby' :
136
- textResourceBindings ?. title && textResourceBindings ?. description ? getDescriptionId ( id ) : undefined ,
136
+ overrideDisplay ?. renderedInTable !== true && textResourceBindings ?. title && textResourceBindings ?. description
137
+ ? getDescriptionId ( id )
138
+ : undefined ,
137
139
autoComplete : autocomplete ,
138
140
className : formatting ?. align ? classes [ `text-align-${ formatting . align } ` ] : '' ,
139
141
readOnly,
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ export const ControlledRadioGroup = (props: PropsFromGenericComponent<'RadioButt
100
100
{ labelText }
101
101
</ Fieldset . Legend >
102
102
{ textResourceBindings ?. description && (
103
- < Fieldset . Description >
103
+ < Fieldset . Description
104
+ className = { cn ( { [ utilClasses . visuallyHidden ] : overrideDisplay ?. renderLegend === false } ) }
105
+ >
104
106
< Lang id = { textResourceBindings ?. description } />
105
107
</ Fieldset . Description >
106
108
) }
You can’t perform that action at this time.
0 commit comments