@elastic/eui 106.2.0 → 106.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/accessibility/index.js +2 -1
- package/es/components/accessibility/live_announcer/index.js +9 -0
- package/es/components/accessibility/live_announcer/live_announcer.js +84 -0
- package/es/components/accessibility/screen_reader_live/screen_reader_live.js +7 -0
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +14 -4
- package/es/components/card/card.js +2 -2
- package/es/components/card/card_select/card_select.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/combo_box/combo_box.a11y.js +97 -81
- package/es/components/combo_box/combo_box.js +3 -2
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +50 -25
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +6 -2
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/cell/focus_utils.js +10 -2
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/controls/column_sorting.js +7 -7
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/data_grid.styles.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/facet/facet_button.js +1 -1
- package/es/components/filter_group/filter_select_item.js +16 -3
- package/es/components/form/field_number/field_number.js +3 -3
- package/es/components/form/field_password/field_password.styles.js +1 -0
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form.styles.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/range/range.styles.js +2 -2
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/thumbDown.js +37 -0
- package/es/components/icon/assets/thumbUp.js +37 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +2 -0
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/global_styling/mixins/_button.js +1 -1
- package/es/services/emotion/prefixer.js +116 -22
- package/eui.d.ts +175 -97
- package/i18ntokens.json +2012 -1994
- package/lib/components/accessibility/index.js +8 -1
- package/lib/components/accessibility/live_announcer/index.js +16 -0
- package/lib/components/accessibility/live_announcer/live_announcer.js +93 -0
- package/lib/components/accessibility/screen_reader_live/screen_reader_live.js +7 -0
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +14 -4
- package/lib/components/card/card.js +2 -2
- package/lib/components/card/card_select/card_select.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/combo_box/combo_box.a11y.js +97 -81
- package/lib/components/combo_box/combo_box.js +3 -2
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +50 -25
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +5 -1
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/cell/focus_utils.js +10 -2
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/controls/column_sorting.js +7 -7
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/data_grid.styles.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/facet/facet_button.js +1 -1
- package/lib/components/filter_group/filter_select_item.js +16 -3
- package/lib/components/form/field_number/field_number.js +3 -3
- package/lib/components/form/field_password/field_password.styles.js +1 -0
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form.styles.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/range/range.styles.js +2 -2
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/thumbDown.js +44 -0
- package/lib/components/icon/assets/thumbUp.js +44 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +2 -0
- package/lib/components/icon/svgs/thumbDown.svg +4 -0
- package/lib/components/icon/svgs/thumbUp.svg +4 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/global_styling/mixins/_button.js +1 -1
- package/lib/services/emotion/prefixer.js +116 -22
- package/optimize/es/components/accessibility/index.js +2 -1
- package/optimize/es/components/accessibility/live_announcer/index.js +9 -0
- package/optimize/es/components/accessibility/live_announcer/live_announcer.js +68 -0
- package/optimize/es/components/accessibility/screen_reader_live/screen_reader_live.js +1 -0
- package/optimize/es/components/call_out/call_out.js +5 -2
- package/optimize/es/components/combo_box/combo_box.a11y.js +97 -81
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -24
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +6 -2
- package/optimize/es/components/datagrid/body/cell/focus_utils.js +10 -2
- package/optimize/es/components/datagrid/data_grid.styles.js +1 -1
- package/optimize/es/components/filter_group/filter_select_item.js +15 -3
- package/optimize/es/components/form/field_number/field_number.js +1 -1
- package/optimize/es/components/form/field_password/field_password.styles.js +1 -0
- package/optimize/es/components/form/form.styles.js +2 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/optimize/es/components/form/range/range.styles.js +2 -2
- package/optimize/es/components/icon/assets/thumbDown.js +36 -0
- package/optimize/es/components/icon/assets/thumbUp.js +36 -0
- package/optimize/es/components/icon/icon_map.js +2 -0
- package/optimize/es/global_styling/mixins/_button.js +1 -1
- package/optimize/es/services/emotion/prefixer.js +116 -22
- package/optimize/lib/components/accessibility/index.js +8 -1
- package/optimize/lib/components/accessibility/live_announcer/index.js +16 -0
- package/optimize/lib/components/accessibility/live_announcer/live_announcer.js +77 -0
- package/optimize/lib/components/accessibility/screen_reader_live/screen_reader_live.js +1 -0
- package/optimize/lib/components/call_out/call_out.js +5 -2
- package/optimize/lib/components/combo_box/combo_box.a11y.js +97 -81
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -24
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +5 -1
- package/optimize/lib/components/datagrid/body/cell/focus_utils.js +10 -2
- package/optimize/lib/components/datagrid/data_grid.styles.js +1 -1
- package/optimize/lib/components/filter_group/filter_select_item.js +15 -3
- package/optimize/lib/components/form/field_number/field_number.js +1 -1
- package/optimize/lib/components/form/field_password/field_password.styles.js +1 -0
- package/optimize/lib/components/form/form.styles.js +2 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/optimize/lib/components/form/range/range.styles.js +2 -2
- package/optimize/lib/components/icon/assets/thumbDown.js +44 -0
- package/optimize/lib/components/icon/assets/thumbUp.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +2 -0
- package/optimize/lib/components/icon/svgs/thumbDown.svg +4 -0
- package/optimize/lib/components/icon/svgs/thumbUp.svg +4 -0
- package/optimize/lib/global_styling/mixins/_button.js +1 -1
- package/optimize/lib/services/emotion/prefixer.js +116 -22
- package/package.json +4 -4
- package/src/components/date_picker/react-datepicker/src/stylesheets/datepicker.scss +6 -7
- package/src/global_styling/mixins/_typography.scss +0 -1
- package/src/themes/amsterdam/global_styling/mixins/_typography.scss +0 -1
- package/test-env/components/accessibility/index.js +8 -1
- package/test-env/components/accessibility/live_announcer/index.js +16 -0
- package/test-env/components/accessibility/live_announcer/live_announcer.js +87 -0
- package/test-env/components/accessibility/screen_reader_live/screen_reader_live.js +7 -0
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +14 -4
- package/test-env/components/card/card.js +2 -2
- package/test-env/components/card/card_select/card_select.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/combo_box/combo_box.a11y.js +97 -81
- package/test-env/components/combo_box/combo_box.js +3 -2
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +50 -25
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +5 -1
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/cell/focus_utils.js +10 -2
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting.js +7 -7
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/data_grid.styles.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/facet/facet_button.js +1 -1
- package/test-env/components/filter_group/filter_select_item.js +16 -3
- package/test-env/components/form/field_number/field_number.js +3 -3
- package/test-env/components/form/field_password/field_password.styles.js +1 -0
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form.styles.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/range/range.styles.js +2 -2
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/thumbDown.js +44 -0
- package/test-env/components/icon/assets/thumbUp.js +44 -0
- package/test-env/components/icon/icon_map.js +2 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/global_styling/mixins/_button.js +1 -1
- package/test-env/services/emotion/prefixer.js +116 -22
|
@@ -187,7 +187,7 @@ export var euiButtonSizeMap = function euiButtonSizeMap(euiThemeContext) {
|
|
|
187
187
|
minWidth: euiTheme.base * (isRefreshVariant ? 6 : 7),
|
|
188
188
|
height: euiTheme.size.l,
|
|
189
189
|
radius: euiTheme.border.radius.small,
|
|
190
|
-
fontScale:
|
|
190
|
+
fontScale: 'xs'
|
|
191
191
|
},
|
|
192
192
|
s: {
|
|
193
193
|
minWidth: euiTheme.base * (isRefreshVariant ? 6 : 7),
|
|
@@ -29,63 +29,157 @@ export var euiStylisPrefixer = function euiStylisPrefixer(element) {
|
|
|
29
29
|
};
|
|
30
30
|
var prefix = function prefix(value, length) {
|
|
31
31
|
switch (hash(value, length)) {
|
|
32
|
-
|
|
32
|
+
/************************************************************
|
|
33
33
|
* `-webkit` prefixes
|
|
34
|
+
************************************************************/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* user-select
|
|
38
|
+
* Safari needs the -webkit prefix as of August 2025
|
|
39
|
+
* @see https://caniuse.com/mdn-css_properties_user-select
|
|
34
40
|
*/
|
|
35
|
-
// user-select - https://caniuse.com/mdn-css_properties_user-select - needed by Safari
|
|
36
41
|
case 4246:
|
|
37
|
-
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* text-decoration
|
|
45
|
+
* iOS Safari needs the -webkit prefix as of August 2025
|
|
46
|
+
* @see https://caniuse.com/text-decoration
|
|
47
|
+
*/
|
|
38
48
|
case 5572:
|
|
39
|
-
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* text-size-adjust
|
|
52
|
+
* iOS Safari needs the -webkit prefix as of August 2025
|
|
53
|
+
* @see https://caniuse.com/text-size-adjust
|
|
54
|
+
*/
|
|
40
55
|
case 2756:
|
|
41
|
-
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* box-decoration-break
|
|
59
|
+
* Safari needs the -webkit prefix as of August 2025
|
|
60
|
+
* @see https://caniuse.com/css-boxdecorationbreak
|
|
61
|
+
*/
|
|
42
62
|
case 3005:
|
|
43
|
-
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite
|
|
66
|
+
* @see https://caniuse.com/css-masks
|
|
67
|
+
* TODO: Remove as this is natively supported since November 2023
|
|
68
|
+
*/
|
|
44
69
|
case 6391:
|
|
45
70
|
case 5879:
|
|
46
71
|
case 5623:
|
|
47
72
|
case 6135:
|
|
48
73
|
case 4599:
|
|
49
74
|
case 4855:
|
|
50
|
-
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* print-color-adjust
|
|
78
|
+
* Chromium-based browsers need the -webkit prefix as of August 2025
|
|
79
|
+
* @see https://caniuse.com/css-color-adjust
|
|
80
|
+
*/
|
|
51
81
|
case 2282:
|
|
52
82
|
return WEBKIT + value + value;
|
|
53
83
|
|
|
54
|
-
|
|
84
|
+
/**
|
|
85
|
+
* background-clip
|
|
86
|
+
* @see https://caniuse.com/background-clip-text
|
|
87
|
+
* TODO: Remove as this is natively supported since November 2023
|
|
88
|
+
*/
|
|
55
89
|
case 4215:
|
|
56
90
|
if (~indexof(value, 'text')) {
|
|
57
91
|
return WEBKIT + value + value;
|
|
58
92
|
}
|
|
59
93
|
|
|
60
|
-
|
|
94
|
+
/************************************************************
|
|
61
95
|
* Intrinsic/extrinsic sizing value prefixes
|
|
62
|
-
|
|
96
|
+
************************************************************/
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* width
|
|
100
|
+
* @see https://caniuse.com/intrinsic-width
|
|
63
101
|
*/
|
|
64
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
65
102
|
case 8116:
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* height
|
|
106
|
+
* @see https://caniuse.com/intrinsic-width
|
|
107
|
+
*/
|
|
66
108
|
case 7059:
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* inline-size
|
|
112
|
+
* @see https://caniuse.com/intrinsic-width
|
|
113
|
+
*/
|
|
67
114
|
case 5753:
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* block-size
|
|
118
|
+
* @see https://caniuse.com/intrinsic-width
|
|
119
|
+
*/
|
|
68
120
|
case 5535:
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* min-width
|
|
124
|
+
* @see https://caniuse.com/intrinsic-width
|
|
125
|
+
*/
|
|
69
126
|
case 5445:
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* min-height
|
|
130
|
+
* @see https://caniuse.com/intrinsic-width
|
|
131
|
+
*/
|
|
70
132
|
case 5701:
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* min-inline-size
|
|
136
|
+
* @see https://caniuse.com/intrinsic-width
|
|
137
|
+
*/
|
|
71
138
|
case 4933:
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* min-block-size
|
|
142
|
+
* @see https://caniuse.com/intrinsic-width
|
|
143
|
+
*/
|
|
72
144
|
case 4677:
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* max-width
|
|
148
|
+
* @see https://caniuse.com/intrinsic-width
|
|
149
|
+
*/
|
|
73
150
|
case 5533:
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* max-height
|
|
154
|
+
* @see https://caniuse.com/intrinsic-width
|
|
155
|
+
*/
|
|
74
156
|
case 5789:
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* max-inline-size
|
|
160
|
+
* @see https://caniuse.com/intrinsic-width
|
|
161
|
+
*/
|
|
75
162
|
case 5021:
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* max-block-size
|
|
166
|
+
* @see https://caniuse.com/intrinsic-width
|
|
167
|
+
*/
|
|
76
168
|
case 4765:
|
|
77
169
|
// stretch, max-content, min-content, fill-available
|
|
78
|
-
if (strlen(value) - 1 - length > 6)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
170
|
+
if (strlen(value) - 1 - length > 6) {
|
|
171
|
+
switch (charat(value, length + 1)) {
|
|
172
|
+
// (f)ill-available
|
|
173
|
+
case 102:
|
|
174
|
+
if (~indexof(value, 'fill-available')) {
|
|
175
|
+
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) === 108 ? '$3' : '$2-$3'));
|
|
176
|
+
}
|
|
177
|
+
// (s)tretch
|
|
178
|
+
case 115:
|
|
179
|
+
if (~indexof(value, 'stretch')) {
|
|
180
|
+
return prefix(replace(value, 'stretch', 'fill-available'), length) + value;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
89
183
|
}
|
|
90
184
|
break;
|
|
91
185
|
}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "EuiLiveAnnouncer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _live_announcer.EuiLiveAnnouncer;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "EuiScreenReaderLive", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -29,4 +35,5 @@ Object.defineProperty(exports, "euiScreenReaderOnly", {
|
|
|
29
35
|
});
|
|
30
36
|
var _screen_reader_live = require("./screen_reader_live");
|
|
31
37
|
var _screen_reader_only = require("./screen_reader_only");
|
|
32
|
-
var _skip_link = require("./skip_link");
|
|
38
|
+
var _skip_link = require("./skip_link");
|
|
39
|
+
var _live_announcer = require("./live_announcer");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _live_announcer = require("./live_announcer");
|
|
7
|
+
Object.keys(_live_announcer).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _live_announcer[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _live_announcer[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiLiveAnnouncer = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _screen_reader_only = require("../screen_reader_only");
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
|
+
var _excluded = ["children", "clearAfterMs", "isActive", "role", "aria-live"];
|
|
16
|
+
/*
|
|
17
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
19
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
20
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
|
+
* Side Public License, v 1.
|
|
22
|
+
*/
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
+
var EuiLiveAnnouncer = exports.EuiLiveAnnouncer = function EuiLiveAnnouncer(_ref) {
|
|
26
|
+
var children = _ref.children,
|
|
27
|
+
_ref$clearAfterMs = _ref.clearAfterMs,
|
|
28
|
+
clearAfterMs = _ref$clearAfterMs === void 0 ? 2000 : _ref$clearAfterMs,
|
|
29
|
+
_ref$isActive = _ref.isActive,
|
|
30
|
+
isActive = _ref$isActive === void 0 ? true : _ref$isActive,
|
|
31
|
+
_ref$role = _ref.role,
|
|
32
|
+
role = _ref$role === void 0 ? 'status' : _ref$role,
|
|
33
|
+
_ref$ariaLive = _ref['aria-live'],
|
|
34
|
+
ariaLive = _ref$ariaLive === void 0 ? 'polite' : _ref$ariaLive,
|
|
35
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
|
+
var _useState = (0, _react.useState)(''),
|
|
37
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
38
|
+
content = _useState2[0],
|
|
39
|
+
setContent = _useState2[1];
|
|
40
|
+
var _useState3 = (0, _react.useState)(false),
|
|
41
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
42
|
+
isMounted = _useState4[0],
|
|
43
|
+
setMounted = _useState4[1];
|
|
44
|
+
(0, _react.useEffect)(function () {
|
|
45
|
+
if (!isMounted) {
|
|
46
|
+
setTimeout(function () {
|
|
47
|
+
// set isMounted with a small delay to trigger an render update after first render
|
|
48
|
+
setMounted(true);
|
|
49
|
+
}, 50);
|
|
50
|
+
}
|
|
51
|
+
return function () {
|
|
52
|
+
setMounted(false);
|
|
53
|
+
};
|
|
54
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
|
+
}, []);
|
|
56
|
+
(0, _react.useEffect)(function () {
|
|
57
|
+
var timeout;
|
|
58
|
+
if (children) {
|
|
59
|
+
setContent( /*#__PURE__*/(0, _react.isValidElement)(children) ? children : (0, _react2.jsx)(_react.default.Fragment, null, children));
|
|
60
|
+
}
|
|
61
|
+
if (clearAfterMs) {
|
|
62
|
+
timeout = setTimeout(function () {
|
|
63
|
+
setContent('');
|
|
64
|
+
}, clearAfterMs);
|
|
65
|
+
}
|
|
66
|
+
return function () {
|
|
67
|
+
if (timeout) {
|
|
68
|
+
clearTimeout(timeout);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}, [children, clearAfterMs]);
|
|
72
|
+
return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, null, (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
73
|
+
role: role,
|
|
74
|
+
"aria-live": isActive ? ariaLive : 'off',
|
|
75
|
+
"aria-atomic": "true"
|
|
76
|
+
}, rest), isMounted && content));
|
|
77
|
+
};
|
|
@@ -64,6 +64,7 @@ var EuiScreenReaderLive = exports.EuiScreenReaderLive = function EuiScreenReader
|
|
|
64
64
|
"aria-atomic": "true"
|
|
65
65
|
// Setting `aria-hidden` and setting `aria-live` to "off" prevents
|
|
66
66
|
// double announcements from VO when `focusRegionOnTextChange` is true
|
|
67
|
+
// WARNING: This solves the issue in VO/Chrome but results in VO/Safari not reading anything at all
|
|
67
68
|
,
|
|
68
69
|
"aria-hidden": toggle ? undefined : 'true',
|
|
69
70
|
"aria-live": !toggle || focusRegionOnTextChange ? 'off' : ariaLive
|
|
@@ -19,9 +19,10 @@ var _panel = require("../panel");
|
|
|
19
19
|
var _spacer = require("../spacer");
|
|
20
20
|
var _title = require("../title");
|
|
21
21
|
var _i18n = require("../i18n");
|
|
22
|
+
var _live_announcer = require("../accessibility/live_announcer");
|
|
22
23
|
var _call_out = require("./call_out.styles");
|
|
23
24
|
var _react2 = require("@emotion/react");
|
|
24
|
-
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "onDismiss"];
|
|
25
|
+
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "onDismiss", "announceOnMount"];
|
|
25
26
|
/*
|
|
26
27
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
27
28
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -46,6 +47,8 @@ var EuiCallOut = exports.EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
|
46
47
|
_ref$heading = _ref.heading,
|
|
47
48
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
48
49
|
onDismiss = _ref.onDismiss,
|
|
50
|
+
_ref$announceOnMount = _ref.announceOnMount,
|
|
51
|
+
announceOnMount = _ref$announceOnMount === void 0 ? false : _ref$announceOnMount,
|
|
49
52
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
53
|
var styles = (0, _services.useEuiMemoizedStyles)(_call_out.euiCallOutStyles);
|
|
51
54
|
var cssStyles = [styles.euiCallOut, onDismiss && styles.hasDismissButton.hasDimissButton, onDismiss && styles.hasDismissButton[size]];
|
|
@@ -103,6 +106,6 @@ var EuiCallOut = exports.EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
|
103
106
|
// instead of navigating to the dismiss button first before the callout content
|
|
104
107
|
header && optionalChildren ? (0, _react2.jsx)(_react.default.Fragment, null, header, dismissButton, (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
105
108
|
size: "s"
|
|
106
|
-
}), optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton));
|
|
109
|
+
}), optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton), announceOnMount && (title || children) && (0, _react2.jsx)(_live_announcer.EuiLiveAnnouncer, null, title && "".concat(title, ", "), children));
|
|
107
110
|
});
|
|
108
111
|
EuiCallOut.displayName = 'EuiCallOut';
|
|
@@ -21,7 +21,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
21
21
|
/// <reference types="../../../cypress/support" />
|
|
22
22
|
|
|
23
23
|
var ComboBox = function ComboBox(_ref) {
|
|
24
|
-
var initialOptions = _ref.initialOptions
|
|
24
|
+
var initialOptions = _ref.initialOptions,
|
|
25
|
+
rowHeight = _ref.rowHeight;
|
|
25
26
|
var _useState = (0, _react.useState)(initialOptions !== null && initialOptions !== void 0 ? initialOptions : [{
|
|
26
27
|
label: 'Titan',
|
|
27
28
|
'data-test-subj': 'titanOption'
|
|
@@ -66,93 +67,108 @@ var ComboBox = function ComboBox(_ref) {
|
|
|
66
67
|
selectedOptions: selectedOptions,
|
|
67
68
|
onChange: onChange,
|
|
68
69
|
isClearable: true,
|
|
69
|
-
isCaseSensitive: true
|
|
70
|
+
isCaseSensitive: true,
|
|
71
|
+
rowHeight: rowHeight
|
|
70
72
|
});
|
|
71
73
|
};
|
|
72
|
-
|
|
73
|
-
cy.realMount((0, _react2.jsx)(ComboBox, null));
|
|
74
|
+
afterEach(function () {
|
|
74
75
|
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('exist');
|
|
75
76
|
});
|
|
76
77
|
describe('EuiComboBox', function () {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
78
|
+
[undefined, 'auto'].forEach(function (rowHeight) {
|
|
79
|
+
describe("Automated accessibility check with rowHeight ".concat(rowHeight !== null && rowHeight !== void 0 ? rowHeight : 'default'), function () {
|
|
80
|
+
it('has zero violations on render', function () {
|
|
81
|
+
cy.realMount((0, _react2.jsx)(ComboBox, {
|
|
82
|
+
rowHeight: rowHeight
|
|
83
|
+
}));
|
|
84
|
+
cy.checkAxe();
|
|
85
|
+
});
|
|
86
|
+
it('has zero violations when the combobox is expanded', function () {
|
|
87
|
+
cy.realMount((0, _react2.jsx)(ComboBox, {
|
|
88
|
+
rowHeight: rowHeight
|
|
89
|
+
}));
|
|
90
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').realClick();
|
|
91
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
92
|
+
cy.checkAxe();
|
|
93
|
+
});
|
|
94
|
+
it('has zero violations after keyboard interaction', function () {
|
|
95
|
+
cy.realMount((0, _react2.jsx)(ComboBox, {
|
|
96
|
+
rowHeight: rowHeight
|
|
97
|
+
}));
|
|
98
|
+
cy.realPress('Tab');
|
|
99
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
100
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
101
|
+
cy.repeatRealPress('ArrowDown');
|
|
102
|
+
cy.realPress('Enter');
|
|
103
|
+
cy.repeatRealPress('ArrowDown');
|
|
104
|
+
cy.realPress('Enter');
|
|
105
|
+
cy.repeatRealPress('ArrowDown');
|
|
106
|
+
cy.realPress('Enter');
|
|
107
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 3);
|
|
108
|
+
cy.checkAxe();
|
|
98
109
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
});
|
|
108
|
-
describe('Manual Accessibility check', function () {
|
|
109
|
-
it('sets the correct aria-activedescendant id', function () {
|
|
110
|
-
cy.realPress('Tab');
|
|
111
|
-
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
112
|
-
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
113
|
-
cy.realPress('ArrowDown');
|
|
114
|
-
cy.realPress('ArrowDown');
|
|
115
|
-
cy.realPress('ArrowDown');
|
|
116
|
-
cy.get('input[data-test-subj="comboBoxSearchInput"]').invoke('attr', 'aria-activedescendant').should('include', 'option-2');
|
|
117
|
-
cy.realPress('Enter');
|
|
118
|
-
cy.realPress('ArrowDown');
|
|
119
|
-
cy.get('input[data-test-subj="comboBoxSearchInput"]').invoke('attr', 'aria-activedescendant').should('include', 'option-3');
|
|
110
|
+
// Close the listbox and interact with the Clear button
|
|
111
|
+
cy.realPress('Escape');
|
|
112
|
+
cy.realPress('Tab');
|
|
113
|
+
cy.get('button[data-test-subj="comboBoxClearButton"]').should('have.focus');
|
|
114
|
+
cy.realPress('Space');
|
|
115
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 0);
|
|
116
|
+
cy.checkAxe();
|
|
117
|
+
});
|
|
120
118
|
});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
119
|
+
describe("Manual Accessibility check with rowHeight ".concat(rowHeight !== null && rowHeight !== void 0 ? rowHeight : 'default'), function () {
|
|
120
|
+
it('sets the correct aria-activedescendant id', function () {
|
|
121
|
+
cy.realMount((0, _react2.jsx)(ComboBox, {
|
|
122
|
+
rowHeight: rowHeight
|
|
123
|
+
}));
|
|
124
|
+
cy.realPress('Tab');
|
|
125
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
126
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
127
|
+
cy.realPress('ArrowDown');
|
|
128
|
+
cy.realPress('ArrowDown');
|
|
129
|
+
cy.realPress('ArrowDown');
|
|
130
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').invoke('attr', 'aria-activedescendant').should('include', 'option-2');
|
|
131
|
+
cy.realPress('Enter');
|
|
132
|
+
cy.realPress('ArrowDown');
|
|
133
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').invoke('attr', 'aria-activedescendant').should('include', 'option-3');
|
|
134
|
+
});
|
|
135
|
+
it('sets the correct aria-activedescendant id with custom option ids', function () {
|
|
136
|
+
cy.realMount((0, _react2.jsx)(ComboBox, {
|
|
137
|
+
rowHeight: rowHeight,
|
|
138
|
+
initialOptions: [{
|
|
139
|
+
id: 'titan',
|
|
140
|
+
label: 'Titan',
|
|
141
|
+
'data-test-subj': 'titanOption'
|
|
142
|
+
}, {
|
|
143
|
+
id: 'enceladus',
|
|
144
|
+
label: 'Enceladus',
|
|
145
|
+
'data-test-subj': 'enceladusOption'
|
|
146
|
+
}, {
|
|
147
|
+
id: 'mimas',
|
|
148
|
+
label: 'Mimas',
|
|
149
|
+
'data-test-subj': 'mimasOption'
|
|
150
|
+
}, {
|
|
151
|
+
id: 'dione',
|
|
152
|
+
label: 'Dione',
|
|
153
|
+
'data-test-subj': 'dioneOption'
|
|
154
|
+
}, {
|
|
155
|
+
id: 'iapetus',
|
|
156
|
+
label: 'Iapetus',
|
|
157
|
+
'data-test-subj': 'iapetusOption'
|
|
158
|
+
}]
|
|
159
|
+
}));
|
|
160
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('exist');
|
|
161
|
+
cy.realPress('Tab');
|
|
162
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
163
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
164
|
+
cy.realPress('ArrowDown');
|
|
165
|
+
cy.realPress('ArrowDown');
|
|
166
|
+
cy.realPress('ArrowDown');
|
|
167
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.attr', 'aria-activedescendant', 'mimas');
|
|
168
|
+
cy.realPress('Enter');
|
|
169
|
+
cy.realPress('ArrowDown');
|
|
170
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.attr', 'aria-activedescendant', 'iapetus');
|
|
171
|
+
});
|
|
156
172
|
});
|
|
157
173
|
});
|
|
158
174
|
});
|