Skip to content

Conversation

praveenkumarkarunanithi
Copy link
Contributor

Root Cause

On Android, the MauiPageControl did not provide proper accessibility support for its indicator items. Each ImageView lacked meaningful accessibility configuration, causing TalkBack to either skip indicators entirely or announce them generically as “button” without context.

Description of Change

Accessibility support for indicator items in MauiPageControl was improved to provide meaningful TalkBack announcements. Each indicator ImageView is now configured with ImportantForAccessibility=Yes and a custom IndicatorAccessibilityDelegate to avoid being read as a generic “button.” Dynamic descriptions are added through UpdateIndicatorAccessibility, announcing the current page (e.g., “Page 2 of 5, selected”), and are updated whenever indicators are created or refreshed.

Issues Fixed

Fixes #31446

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Note:
The device test case was added only for Android, since this issue fix was specific to the Android platform.

Output Video

Before Issue Fix After Issue Fix
Beforefix.mov
Afterfix.mov
@praveenkumarkarunanithi praveenkumarkarunanithi changed the title Fix 31446 [Android] Fix for IndicatorView Provides Correct TalkBack Accessibility Description Sep 25, 2025
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Sep 25, 2025
Copy link
Contributor

Hey there @@praveenkumarkarunanithi! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Sep 25, 2025
@jsuarezruiz jsuarezruiz added platform/android t/a11y Relates to accessibility labels Sep 25, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).
@praveenkumarkarunanithi praveenkumarkarunanithi marked this pull request as ready for review September 26, 2025 10:43
@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 10:43
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes TalkBack accessibility support for IndicatorView on Android by providing meaningful accessibility descriptions for indicator items. Previously, TalkBack would either skip indicators or announce them generically as "button" without context.

  • Adds proper accessibility configuration for indicator ImageViews with meaningful TalkBack announcements
  • Implements custom accessibility delegate to prevent generic "button" announcements
  • Includes device test to verify correct accessibility descriptions are provided

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Core/src/Platform/Android/MauiPageControl.cs Adds accessibility support with custom delegate and dynamic content descriptions for indicator items
src/Controls/tests/DeviceTests/Elements/CarouselView/CarouselViewTests.Android.cs Adds device test to verify TalkBack accessibility descriptions are correctly set
Comment on lines +176 to +178
var contentDescription = isSelected
? $"Item {itemNumber} of {totalItems}, selected"
: $"Item {itemNumber} of {totalItems}";
Copy link
Preview

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded strings 'Item', 'of', and 'selected' should be localized or made configurable to support internationalization and different accessibility preferences.

Copilot uses AI. Check for mistakes.


var firstIndicator = mauiPageControl.GetChildAt(0) as ImageView;
Assert.NotNull(firstIndicator);
Assert.Equal("Item 1 of 3, selected", firstIndicator.ContentDescription);
Copy link
Preview

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test only verifies the first indicator's accessibility description. Consider adding assertions for non-selected indicators and testing accessibility state changes when the position changes to ensure complete coverage of the accessibility functionality.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android t/a11y Relates to accessibility
2 participants