[.NET 9] Add a11y fixes to DeveloperBalance App#611
Conversation
…ing issues with vscode
There was a problem hiding this comment.
Pull Request Overview
Apply a11y improvements and .NET 9 updates across the DeveloperBalance sample, including replacing legacy layouts with CollectionView, enhancing screen-reader semantics, and refining ViewModel navigation and repository logic.
- Swap ScrollView/BindableLayout for CollectionView and add semantic properties for accessibility
- Introduce null-safe navigation signatures and SelectedProject/SelectedTags properties in page models
- Add Windows-specific tab stops, segment descriptions, and repository association checks
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| nuget.config | New NuGet package source |
| Platforms/MacCatalyst/Info.plist | Added app category key |
| Pages/ProjectListPage.xaml.cs | Bound AppearingBehavior’s context |
| Pages/ProjectListPage.xaml | Swapped to CollectionView and updated semantics |
| Pages/ProjectDetailPage.xaml.cs | Added selection-changed handler |
| Pages/ProjectDetailPage.xaml | Replaced tag templates with multi-select view |
| Pages/MainPage.xaml | Replaced horizontal ScrollView with CollectionView |
| Pages/Controls/TaskView.xaml | Adjusted layout, added automation properties |
| Pages/Controls/ProjectCardView.xaml | Switched to FlexLayout for tags |
| Pages/Controls/CategoryChart.xaml.cs | Enabled tab stop on Windows |
| Pages/Controls/CategoryChart.xaml | Hidden shimmer from accessibility tree |
| PageModels/ProjectListPageModel.cs | Added SelectedProject property, updated command |
| PageModels/ProjectDetailPageModel.cs | Tracked SelectedTags, refactored ToggleTag logic |
| PageModels/MainPageModel.cs | Added SelectedProject, updated navigation command |
| MauiProgram.cs | Appended keyboard focus mapping for Windows |
| DeveloperBalance.csproj | Bumped MauiVersion, package IDs and versions |
| Data/TagRepository.cs | Prevent duplicate tag–project associations |
| AppShell.xaml.cs | Added semantic description for theme selector |
| AppShell.xaml | Added descriptions for light/dark mode segments |
Comments suppressed due to low confidence (4)
PageModels/ProjectListPageModel.cs:31
- The command method signature returns a nullable Task and checks
project is null, butprojectis non-nullable. Change the return type toTask, remove the null check, and callShell.Current.GoToAsync(...)directly.
Task? NavigateToProject(Project project)
PageModels/MainPageModel.cs:155
- This method signature makes the Task nullable and guards against a
nullproject, butprojectis non-nullable. Refactor to returnTask, drop the null check, and callShell.Current.GoToAsync(...)directly.
private Task? NavigateToProject(Project project)
Data/TagRepository.cs:231
- Inside
IsAssociated, callingSaveItemAsync(item)duplicates the initial tag save and incurs extra database overhead. Remove this call and assume the tag exists before checking the association.
await SaveItemAsync(item);
Pages/ProjectDetailPage.xaml:61
- Removing the
SemanticProperties.Hinton the icon grid loses the guidance for screen-reader users. Consider reintroducing a concise hint so that assistive technologies convey actionable context.
SemanticProperties.Hint="Icon representing the type of task . Tap to select"
| InitializeComponent(); | ||
| var currentTheme = Application.Current!.RequestedTheme; | ||
| ThemeSegmentedControl.SelectedIndex = currentTheme == AppTheme.Light ? 0 : 1; | ||
| #if ANDROID || WINDOWS |
There was a problem hiding this comment.
Why only on Android and Windows?
| <Nullable>enable</Nullable> | ||
| <!-- https://github.com/CommunityToolkit/Maui/issues/2205 --> | ||
| <NoWarn>XC0103</NoWarn> | ||
| <MauiVersion>9.0.60</MauiVersion> |
There was a problem hiding this comment.
Removing it we are going to use 9.1.1 and requires to downgrade the Toolkit, but we use something from the latest versions.
There was a problem hiding this comment.
aw yea :-(
Well, we will hopefully be releasing 9.0.81 here soon into workloads
| BindingContext = model; | ||
| } | ||
|
|
||
| private async void CollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e) |
There was a problem hiding this comment.
Can this all be moved to a RelayCommand in the ViewModel?
There was a problem hiding this comment.
Yes, moved to the ViewModel.
| #if WINDOWS | ||
| if (chart is Microsoft.Maui.Platform.ContentPanel contentPanel) | ||
| { | ||
| contentPanel.IsTabStop = true; |
There was a problem hiding this comment.
Can we move this to a mapper?
Is this an issue that's been highlighted to SF? Should they make this control a tabstop by default?
There was a problem hiding this comment.
Sure, move to a Mapper.
There was a problem hiding this comment.
@tj-devel709 Is this an issue that's been highlighted to SF? Should they make this control a tabstop by default?
I can follow the conversation with Sf about it.
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Apply accessibility fixes from PR #611 to .NET 10 DeveloperBalance app
Apply missing accessibility fixes from PR #611 to .NET 10 DeveloperBalance app
…nce app Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Apply a11y fixes to DeveloperBalance App to the .NET 9 samples.