Describe the bug
Issue
Accessibility Insights reporting: "A button must support one of these patterns: Invoke, Toggle, or ExpandCollapse." when using a SettingsCard that is clickable (IsClickEnabled=True).
Investigation
SettingsCardAutomationPeer may possibly need to implement GetPatternCore(PatternInterface patternInterface) method.
protected override object GetPatternCore(PatternInterface patternInterface)
{
return patternInterface == PatternInterface.Invoke ? this : base.GetPatternCore(patternInterface);
}
- Implement
IInvokeProvider in the same class (since we're returning this).
- Or instead, maybe the
SettingsCardAutomationPeer can inherit from ButtonBaseAutomationPeer?
Steps to reproduce
- Add a settings card
<controls:SettingsCard Header="Example" IsClickEnabled="True" />
- Run accessibility scan on the displayed card
- The following error is reported: "A button must support one of these patterns: Invoke, Toggle, or ExpandCollapse."
Expected behavior
No errors
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
Describe the bug
Issue
Accessibility Insights reporting: "A button must support one of these patterns: Invoke, Toggle, or ExpandCollapse." when using a SettingsCard that is clickable (
IsClickEnabled=True).Investigation
SettingsCardAutomationPeermay possibly need to implementGetPatternCore(PatternInterface patternInterface)method.IInvokeProviderin the same class (since we're returningthis).SettingsCardAutomationPeercan inherit fromButtonBaseAutomationPeer?Steps to reproduce
Expected behavior
No errors
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.