Skip to content
Merged
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/eui/changelogs/upcoming/9239.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Made `EuiQuickSelectPanel` available for importing from the `@elastic/eui` package

**Accessibility**

- Improved the accessibility of input fields in the popover of `EuiSuperDatePicker` by properly labeling them

Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const EuiAbsoluteTab: FunctionComponent<EuiAbsoluteTabProps> = ({
[dateFormat]
);

const textInputLabelId = useGeneratedHtmlId();
const timeZomeDescriptionId = useGeneratedHtmlId();
const submitButtonLabel = useEuiI18n(
'euiAbsoluteTab.dateFormatButtonLabel',
Expand Down Expand Up @@ -205,6 +206,7 @@ export const EuiAbsoluteTab: FunctionComponent<EuiAbsoluteTabProps> = ({
describedByIds={[timeZomeDescriptionId]}
>
<EuiFieldText
aria-labelledby={textInputLabelId}
compressed
isInvalid={isTextInvalid}
value={textInputValue}
Expand All @@ -218,7 +220,9 @@ export const EuiAbsoluteTab: FunctionComponent<EuiAbsoluteTabProps> = ({
setIsReadyToParse(true);
}}
data-test-subj="superDatePickerAbsoluteDateInput"
prepend={<EuiFormLabel>{labelPrefix}</EuiFormLabel>}
prepend={
<EuiFormLabel id={textInputLabelId}>{labelPrefix}</EuiFormLabel>
}
/>
</EuiFormRow>
{hasUnparsedText && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const EuiRelativeTab: FunctionComponent<EuiRelativeTabProps> = ({
return parsedValue.locale(locale || 'en').format(dateFormat);
}, [isInvalid, value, roundUp, locale, dateFormat]);

const textInputLabelId = useGeneratedHtmlId();
const relativeDateInputNumberDescriptionId = useGeneratedHtmlId();
const timeZomeDescriptionId = useGeneratedHtmlId();
const numberAriaLabel = useEuiI18n(
Expand Down Expand Up @@ -178,11 +179,14 @@ export const EuiRelativeTab: FunctionComponent<EuiRelativeTabProps> = ({
</EuiFlexGroup>
<EuiSpacer size="s" />
<EuiFieldText
aria-labelledby={textInputLabelId}
compressed
value={formattedValue}
readOnly
aria-describedby={timeZomeDescriptionId}
prepend={<EuiFormLabel>{labelPrefix}</EuiFormLabel>}
prepend={
<EuiFormLabel id={textInputLabelId}>{labelPrefix}</EuiFormLabel>
}
/>
<EuiScreenReaderOnly>
<p id={relativeDateInputNumberDescriptionId}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export type { EuiQuickSelectPopoverProps } from './quick_select_popover';
export { EuiQuickSelectPopover } from './quick_select_popover';
export type { EuiQuickSelectProps } from './quick_select';
export { EuiQuickSelect } from './quick_select';
export { EuiQuickSelectPanel } from './quick_select_panel';
export type { EuiRecentlyUsedProps } from './recently_used';
export { EuiRecentlyUsed } from './recently_used';
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export const QuickSelectOnly: Story = {

return (
<EuiFlexGroup>
<EuiFieldText onFocus={() => setCollapsed(true)} />
<EuiFieldText
onFocus={() => setCollapsed(true)}
onBlur={() => setCollapsed(false)}
/>
<EuiSuperDatePicker
{...args}
isQuickSelectOnly={isCollapsed}
Expand Down Expand Up @@ -379,10 +382,6 @@ const StatefulSuperDatePicker = (props: EuiSuperDatePickerProps) => {
end={_end}
onTimeChange={handleOnTimeChange}
onRefresh={onRefresh}
css={css`
/* ensure the input content is visible without being truncated */
inline-size: 700px;
`}
Comment on lines -382 to -385
Copy link
Contributor Author

@acstll acstll Nov 25, 2025

Choose a reason for hiding this comment

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

@mgadewoll the problem was this 😁 β€” I couldn't find anything breaking after removing this, and I updated the stories (they look a bit more "real"), but I might be missing something β€” where is/was the input content being truncated?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good catch! Honestly, I can't recall what was the scenario there. But it looks to behave fine in the stories, so it's fine to remove. Ensuring stories showcase expected behavior has higher priority in any case. πŸ‘

{...rest}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export default () => {
onTimeChange={onTimeChange}
showTimeWindowButtons={showButtons}
showUpdateButton={false}
width={"full"}
width={"auto"}
/>
</>
);
Expand Down