-
Notifications
You must be signed in to change notification settings - Fork 105
Add keyboard focus visual indicator for ToggleSwitch control. #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keyboard focus visual indicator for ToggleSwitch control. #476
Conversation
|
If it's a good idea, I or someone else can continue adding effects to all the elements. To completely remove the ugly dot focus limiter. It doesn't fit into the overall visual picture in any way. |
SKProCH
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall fine
|
The FocusAdorner property is used to show a default focus visual, typically a Border, around a Control with :focus-visible. When using :focus-visible to show a custom visual indicator, setting FocusAdorner to null will avoid showing a duplicate indicator. |
|
I changed focus to focus-visible. |
|
Now the visual effect will only work when navigating with the keyboard. This will allow us to improve all other controls in the future. |


Problem
The ToggleSwitch control in Material.Avalonia lacks proper visual feedback when focused via keyboard navigation (Tab, Shift+Tab), gamepad, or other input methods. This creates accessibility issues and poor user experience for:
Technical Changes