Accessibility Report: I raised concern about including this before but I don't think this 'hold down button' paradigm is accessible at the moment.
Right now holding down the button does nothing on an iPad.
The action is not announced to screen readers
The long-press action is already in use on Windows with touch screens and works everywhere, including web browsers. The effect of executing custom action on long press can be therefore unpredictable and it could depend on the operating system and/or browser.
Unless you have some solid workaround of this problem, you should not ignore this shortcoming, especially when designing web UI, which is expected to be platform independent. Without solid workaround available, I would categorize the severity of this problem as a stopper.
Long-pressing a button isn't a known action on web for desktops, it simply doesn't exist (that's why you need to use JavaScript for this to work) and you won't see it in other style guides.
We need to at least fix the iPad and screen reader issues above and display messaging for users with JavaScript and provide a warning/guidance about using this in production.
Related to trimble-oss/modus-web-components#1439
Accessibility Report: I raised concern about including this before but I don't think this 'hold down button' paradigm is accessible at the moment.
Unless you have some solid workaround of this problem, you should not ignore this shortcoming, especially when designing web UI, which is expected to be platform independent. Without solid workaround available, I would categorize the severity of this problem as a stopper.
Long-pressing a button isn't a known action on web for desktops, it simply doesn't exist (that's why you need to use JavaScript for this to work) and you won't see it in other style guides.
We need to at least fix the iPad and screen reader issues above and display messaging for users with JavaScript and provide a warning/guidance about using this in production.
For the style guide, I think we should mention about instead of using this button consider asking the user to confirm the action again. Smashing Magazine posted an excellent article 'How To Manage Dangerous Actions In User Interfaces' last week with ideas: https://www.smashingmagazine.com/2024/09/how-manage-dangerous-actions-user-interfaces/