Skip to content

Conversation

@Jaylyn-Barbee
Copy link
Contributor

@Jaylyn-Barbee Jaylyn-Barbee commented Jul 15, 2025

Fixes #391

Since it is optional for the SettingsCard to be clickable, there are times where it is expecting button like behaviors when it is not in button mode which is an accessibility issue. To fix, I ensured the card uses the default button behaviors and also override the pattern function to only expose the button bits when the card is in button mode.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

#391

What is the new behavior?

The SettingsCardAutomationPeer correctly behaves as a button when in the clickable mode.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • Contains NO breaking changes

Other information

@Jaylyn-Barbee
Copy link
Contributor Author

@Jaylyn-Barbee please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree company="Microsoft"

Copy link
Collaborator

@niels9001 niels9001 left a comment

Choose a reason for hiding this comment

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

@Arlodotexe @Jaylyn-Barbee I'm not able to validate these changes as I'm OOF, but looking at the code, this does make sense to me :)!

Copy link
Member

@Arlodotexe Arlodotexe left a comment

Choose a reason for hiding this comment

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

Tested locally, appears to work as intended without regressions. Thanks for helping us improve the toolkit!

@Arlodotexe Arlodotexe merged commit 5bc705f into CommunityToolkit:main Jul 17, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SettingsCard missing invoke pattern

4 participants