-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Global Disable Ripple Does Not Affect Keyboard Focus #8298
Comments
I will leave it to @devversion and @tinayuangao to confirm but I believe this is working as intended because the ripple you are seeing is to show the focus state. Without this background circle showing the focus is not shown which results in a lack of a11y for the checkbox. |
* Shows additional interfaces in the Dgeni API documentation * Adds documentation for the `RippleGlobalOptions` Closes angular#8298.
* Shows additional interfaces in the Dgeni API documentation * Adds documentation for the `RippleGlobalOptions` Closes angular#8298.
* Shows additional interfaces in the Dgeni API documentation * Adds documentation for the `RippleGlobalOptions` Closes angular#8298.
* Shows additional interfaces in the Dgeni API documentation * Adds documentation for the `RippleGlobalOptions` Closes angular#8298.
* Shows additional interfaces in the Dgeni API documentation * Adds documentation for the `RippleGlobalOptions` Closes angular#8298.
Also adds documentation for the `RippleGlobalOptions` Closes #8298
The issue is closed but the problem itself still seems to be unsolved. When the ripple effect is disabled through the global options, the ripple is still displayed when a checkbox or a radio button receives the focus using tab key (just tested on Stackblitz with the latest version of the library). Do you even plan to solve this? |
It's intentionally not removing the focus ripples, because those are part of the accessibility we want to provide for all Angular Material components. We can remove the animation if ripples are globally disabled though. This would improve the performance and won't really look like a ripple anymore. cc. @jelbourn |
@devversion yeah, it should probably disable the animation |
Is there a way to temporarily solve this? I have global ripple disabled and have been trying to solve the :focus ripple via css for quite some time now... |
@ssgriffen You should be able to do: .mat-ripple-element {
transition-duration: 0ms !important;
} |
@devversion That didn't work for me. Any other ideas? I've tried alll the way up to this
Thats sitting on my main styles.css sheet... |
@ssgriffen In my case it worked when I've set the I have a new feature in mind, which should allow developers to easily control the animation. See #9253 |
Hi @devversion we tried that... We also went into node_modules and basically nuked the ripple system. It didn't work. I assume it's due to the fact we didn't change the .min.js Assuming we don't want ripples at all, what would be the easiest way to just stop all ripples? |
This shows that it works: You might just do the same and just use |
@devversion click right above the button and tab down (like I'm doing for a form), you'll see the ripple. |
@ssgriffen I thought the intention was to remove the the animation of the ripple? If you want to remove the ripple completely you can change the |
You are a hero @devversion don't let it go to your head though, keep grinding. over and out. |
Closing, as this is working as intended, and there are possibilities (that are mentioned in the ripple.md file) that allow customizing the animation. See #9253 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug.
What is the expected behavior?
When you set
disabled: true
usingRippleGlobalOptions
, the ripple should disappear completely, no matter if the focus arrives through tab key on keyboard or through mouse click.What is the current behavior?
After setting
disabled: true
usingRippleGlobalOptions
, the ripple effect still appears when the focus arrives through tab key.What are the steps to reproduce?
Here is a simple plunker containing two checkboxes: https://plnkr.co/edit/7aqtkq?p=preview
You can see that ripple effect is disabled globally. When you click any checkbox with mouse, the ripple effect does not appear, as expected. However, when you select any checkbox using tab key, the ripple effect still appears.
What is the use-case or motivation for changing an existing behavior?
I guess that when you disable ripple effect, you want to disable it completely.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4, latest version of Material, Windows, browsers Google Chrome, Internet Explorer.
Is there anything else we should know?
One can get rid of the ripple effect completely using css
.mat-checkbox-ripple { display: none; }
The text was updated successfully, but these errors were encountered: