Screen Reader Focus Management After Navigation Events
Focus management is one of the most complex and frequently broken aspects of accessibility in Flutter apps with rich navigation. The focus management service must programmatically direct VoiceOver and TalkBack focus to the appropriate element after every navigation transition. For screen pushes, focus moves to the new screen's primary heading or first interactive element. For back navigation, focus returns to the element that triggered the navigation. For tab switches, focus moves to the tab's primary content heading. For modal open, focus enters the modal. For modal close, focus returns to the trigger. This must be tested against all major navigation paths used by peer mentors.
User Story
Acceptance Criteria
- Given I am using VoiceOver and I tap a contact card to open the contact detail screen, when the detail screen finishes rendering, then VoiceOver focus is on the contact's name heading at the top of the screen
- Given I am using VoiceOver on a contact detail screen and I activate the back button, when the previous screen appears, then focus is on the contact card I originally tapped
- Given I open the activity registration bottom sheet, when the sheet opens, then VoiceOver focus moves to the sheet's title or the first form field
- Given I close the activity registration sheet by tapping the close button, when the sheet is dismissed, then focus returns to the 'Add' button in the bottom navigation bar
- Given I switch from the Contacts tab to the Home tab, when the Home tab renders, then focus moves to the first heading or primary content area of the Home screen and a live region announces 'Home'
Business Value
Poor focus management is the single most common accessibility failure in mobile apps with dynamic navigation. For blind peer mentors from Blindeforbundet, unpredictable focus placement after navigation makes the app effectively unusable — they cannot determine which screen they are on or which element to interact with next. Correct focus management is required by WCAG 2.2 AA Success Criterion 2.4.3 (Focus Order) and 3.2.2 (On Input) and is a prerequisite for the app being usable by the blind and visually impaired community that represents a core user segment.
Components
- Focus Management Service service
- Navigation Accessibility Service service
- Live Region Announcer ui
- Accessibility Live Region Announcer infrastructure
- Semantics Wrapper Widget ui
- Tab State Manager service
- Accessible Modal Sheet Widget ui