Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function ChoiceSelectAnswerOptionFields(props: ChoiceSelectAnswerOptionFieldsPro
readOnly={readOnly && readOnlyVisualStyle === 'readonly'}
renderInput={(params) => (
<StandardTextField
multiline
textFieldWidth={textFieldWidth}
isTabled={isTabled}
placeholder={entryFormat || displayPrompt}
Expand All @@ -93,7 +92,14 @@ function ChoiceSelectAnswerOptionFields(props: ChoiceSelectAnswerOptionFieldsPro
<ExpressionUpdateFadingIcon fadeIn={expressionUpdated} disabled={readOnly} />
<DisplayUnitText readOnly={readOnly}>{displayUnit}</DisplayUnitText>
</>
)
),
inputProps: {
...params.inputProps,
...(isTabled
? { 'aria-label': qItem.text ?? 'Unnamed choice dropdown' }
: { 'aria-labelledby': `label-${qItem.linkId}` }),
role: 'combobox'
}
}
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ function ChoiceSelectAnswerValueSetFields(props: ChoiceSelectAnswerValueSetField
readOnly={readOnly && readOnlyVisualStyle === 'readonly'}
renderInput={(params) => (
<StandardTextField
multiline
textFieldWidth={textFieldWidth}
isTabled={isTabled}
placeholder={entryFormat || displayPrompt}
Expand All @@ -103,7 +102,10 @@ function ChoiceSelectAnswerValueSetFields(props: ChoiceSelectAnswerValueSetField
),
inputProps: {
...params.inputProps,
'aria-label': qItem.text ?? 'Unnamed choice dropdown'
...(isTabled
? { 'aria-label': qItem.text ?? 'Unnamed choice dropdown' }
: { 'aria-labelledby': `label-${qItem.linkId}` }),
role: 'combobox'
}
}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const ChoiceAnswerOptionBasic: Story = createStory({
expect(resultAfterClear).toHaveLength(0);

const elementAfterClear = await findByLinkIdOrLabel(canvasElement, aoTargetLinkId);
const input = elementAfterClear.querySelector('textarea');
const input = elementAfterClear.querySelector('input');
expect(input?.value).toBe('');
}
}) as Story;
Expand Down
Loading