Accessibility in Xamarin Accordion (SfAccordion)

10 Oct 20231 minute to read

The Accordion control has built-in AutomationId for inner elements. The AutomationId API allows the automation framework to find and interact with the inner elements of the Accordion control. To keep unique AutomationId, these inner element’s AutomationIds are updated based on the Accordion control AutomationId.

For example, if you set Accordion’s AutomationId as “Automation”, then Automation framework will interact with expander icon of AccordionItem as AutomationItem1 Expander. Here, along with the control’s AutomationId, index of an item will also be added for differentiating each AccordionItem expander.

View AutomationId Format Example
Expander Icon ControlAutomationId+Item+ItemIndex Expander AutomationItem1 Expander

where Automation represents Control AutomationId, Item1 represents Item text appended with item index which has been generated based on item position and Expander represents the expander dropdown icon.

The following image shows the AutomationIds of inner elements.

Automation id for accordion

See also

How to get an AccordionItem in Xamarin.Forms (SfAccordion)