[ListItem] Add support for detailed content, address accessibility issue #2191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms Impacted
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 usingAny 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
Tab+z
is pressed, only the sub actions are shown as optionsPull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow