Enforce Maximum Five Items Before Pagination in Selection Lists
CognitiveModeService enforces a maximum-five-item constraint on all selection lists when cognitive mode is active. Lists exceeding five items automatically transition to a paginated view with a search bar to narrow options. In standard mode this constraint is relaxed. The constraint applies globally across activity type selection, contact pickers, organization selectors, and any other list-based selection UI throughout the app.
User Story
Acceptance Criteria
- Given cognitive mode is enabled and a selection list contains more than five items, when the list renders, then only the first five items are visible and a 'Show more / Search' control is present
- Given cognitive mode is enabled and a user activates the search control on a long list, when they type a query, then the list filters in real time and shows only matching items
- Given cognitive mode is disabled, when a selection list renders, then all items are displayed without the five-item constraint
- Given cognitive mode is enabled and a list has five or fewer items, when it renders, then all items are visible with no pagination control shown
- Given any selection screen validated against the stroke patient persona checklist, when the list exceeds five items and cognitive mode is on, then the checklist validation passes only if pagination/search is implemented
Business Value
Choice overload is a documented barrier for stroke survivors and users with cognitive impairments. Limiting list size to five items is a specific technical constraint derived from the cognitive accessibility requirements in the NHF workshop. This reduces abandoned activity registrations by preventing users from being overwhelmed during selection steps.