{"record":{"id":"953580b3a849379e","repo":"bevyengine/bevy","slug":"no-tab-groups-found","errorCode":null,"errorMessage":"No tab groups found","messagePattern":"No tab groups found","errorType":"exception","errorClass":"TabNavigationError","httpStatus":null,"severity":"warning","filePath":"crates/bevy_input_focus/src/tab_navigation.rs","lineNumber":134,"sourceCode":"    /// Navigate to the previous focusable entity, wrapping around to the end if at the beginning.\n    ///\n    /// This is commonly triggered by pressing Shift+Tab.\n    Previous,\n    /// Navigate to the first focusable entity.\n    ///\n    /// This is commonly triggered by pressing Home.\n    First,\n    /// Navigate to the last focusable entity.\n    ///\n    /// This is commonly triggered by pressing End.\n    Last,\n}\n\n/// An error that can occur during [tab navigation](crate::tab_navigation).\n#[derive(Debug, Error, PartialEq, Eq, Clone)]\npub enum TabNavigationError {\n    /// No tab groups were found.\n    #[error(\"No tab groups found\")]\n    NoTabGroups,\n    /// No focusable entities were found.\n    #[error(\"No focusable entities found\")]\n    NoFocusableEntities,\n    /// Could not navigate to the next focusable entity.\n    ///\n    /// This can occur if your tab groups are malformed.\n    #[error(\"Failed to navigate to next focusable entity\")]\n    FailedToNavigateToNextFocusableEntity,\n    /// No tab group for the current focus entity was found.\n    #[error(\"No tab group found for currently focused entity {previous_focus}. Users will not be able to navigate back to this entity.\")]\n    NoTabGroupForCurrentFocus {\n        /// The entity that was previously focused,\n        /// and is missing its tab group.\n        previous_focus: Entity,\n        /// The new entity that will be focused.\n        ///\n        /// If you want to recover from this error, set [`InputFocus`] to this entity.","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_input_focus/src/tab_navigation.rs#L116-L152","documentation":"TabNavigation::navigate and TabNavigation::initialize return this when the world contains no entities with a TabGroup component (crates/bevy_input_focus/src/tab_navigation.rs:195). Tab navigation requires every focusable entity to be a descendant of a TabGroup, so with zero groups there is nothing to tab through.","triggerScenarios":"Pressing Tab with TabNavigationPlugin + InputDispatchPlugin installed but no TabGroup anywhere in the scene; calling TabNavigation::navigate when tabgroup_query is empty; calling initialize(parent, ...) on a parent that itself lacks TabGroup (which also maps to this variant, tab_navigation.rs:231-233).","commonSituations":"Forgot to add TabGroup to the UI root; the group node was despawned with the menu; the component was added to an entity with no children so it never registers focusable descendants.","solutions":["Add TabGroup::new(order) to the root node of each focusable UI subtree.","For TabNavigation::initialize, pass a parent entity that itself carries the TabGroup component.","Give groups distinct increasing order values so inter-group tab order matches the design."],"exampleFix":"// before\ncommands.spawn(Node::default()).with_children(|p| {\n    p.spawn((Button, TabIndex(0))); // no TabGroup anywhere -> NoTabGroups\n});\n\n// after\ncommands.spawn((Node::default(), TabGroup::new(0))).with_children(|p| {\n    p.spawn((Button, TabIndex(0)));\n});","handlingStrategy":"validation","validationCode":"use bevy_ecs::prelude::*;\nuse bevy_input_focus::tab_navigation::TabGroup;\n\nfn has_tab_groups(groups: &Query<(), &TabGroup>) -> bool {\n    !groups.is_empty()\n}","typeGuard":null,"tryCatchPattern":"if let Err(TabNavigationError::NoTabGroups) = tab_nav.navigate(&input_focus, action) {\n    // spawn/attach TabGroup roots before retrying navigation\n}","preventionTips":["Add TabGroup::new(order) to every focusable UI subtree at spawn time.","Give each group a distinct order value up front.","Assert in dev builds that screens with Focusable entities contain at least one TabGroup."],"tags":["bevy","input-focus","tab-navigation","ui","keyboard","ecs-component"],"backgroundTag":"missing-required-component","analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}