Skip to content

[ListItem] Add support for detailed content, address accessibility issue#2191

Merged
alexanderboswell merged 3 commits intomicrosoft:mainfrom
alexanderboswell:user/alboswel/ListItemUpdates
Jul 21, 2025
Merged

[ListItem] Add support for detailed content, address accessibility issue#2191
alexanderboswell merged 3 commits intomicrosoft:mainfrom
alexanderboswell:user/alboswel/ListItemUpdates

Conversation

@alexanderboswell
Copy link
Copy Markdown
Contributor

@alexanderboswell alexanderboswell commented Jul 18, 2025

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Detailed content support

To allow the use of generics for content that is displayed with the detailed button ... is selected, adding the ability to pass that into the ListItem. The reasoning for this is that we need to correctly display a sheet from the button. To be able to do that we need to know the content to display in the sheet. This requires the client to pass in that view to ListItem. With using generics, we can achieve this to optimize for view layout instead of using Any View which would get redrawn more often.

Accessibility bug

When the List item is tappable, we aren't correctly grouping the accessibility elements. This makes it so the whole view gets correct focus in VoiceOver/full keyboard access, but provides the action to tap on the List item show up more than once. For example, in full keyboard access, when focused on a list item and pressing tab + z it shows a list of the sub actions that can be taken on the list item. Currently, that list of actions also includes the action that occurs when the list item is selected. This should not occur, it should only be sub actions, or in the case of List item, the content in the trailing view that has a tap gesture associated with it, like a button.

Binary change

(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)

Verification

Visual Verification
Description Image
The detailed content showing when it is provided Screenshot 2025-07-18 at 1 26 20 PM
The list item still gets correct VoiceOver focus Screenshot 2025-07-18 at 1 26 11 PM
When Tab+z is pressed, only the sub actions are shown as options Screenshot 2025-07-18 at 1 26 04 PM

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@alexanderboswell alexanderboswell requested a review from a team as a code owner July 18, 2025 20:44
@alexanderboswell alexanderboswell enabled auto-merge (squash) July 18, 2025 20:46
@alexanderboswell alexanderboswell merged commit 8b33246 into microsoft:main Jul 21, 2025
7 checks passed
@alexanderboswell alexanderboswell deleted the user/alboswel/ListItemUpdates branch July 21, 2025 16:50
@joannaquu joannaquu mentioned this pull request Oct 23, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants