Skip to content
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

Ignore rage/dead clicks from download links #9087

Closed
billyvg opened this issue Sep 21, 2023 · 3 comments
Closed

Ignore rage/dead clicks from download links #9087

billyvg opened this issue Sep 21, 2023 · 3 comments

Comments

@billyvg
Copy link
Member

billyvg commented Sep 21, 2023

Currently, we are getting false positive dead/rage clicks from download links because they don't mutate the DOM in any way. There's no standardized or semantic way to identify these download links, but I think we can look at it from an a11y approach and ignore some aria attribute values that contain Download or Export.

Some possible attribute candidates: aria-label, aria-roledescription

@mydea
Copy link
Member

mydea commented Sep 22, 2023

You can already manually ignore selectors via slowClickIgnoreSelectors. Are you talking about automatically ignoring some elements based on their attributes?

If so, there are two ways I guess:

  1. Provide a default slowClickIgnoreSelectors option, e.g.:
slowClickIgnoreSelectors: [
 '[aria-label*="download" i]',
 '[aria-label*="export" i]',
 '[title*="download" i]', 
 '[title*="export" i]', 
] 
  1. Always apply these unrelated to slowClickIgnoreSelectors. This has the problem that you can't opt out of it then...

IMHO 1. is pretty easily doable, I think we could start with [title] & [aria-label] including Download or Export and have a decent coverage.

@billyvg billyvg changed the title Allow a way to ignore dead/rage clicks Ignore rage/dead clicks from download links Sep 25, 2023
@billyvg
Copy link
Member Author

billyvg commented Sep 25, 2023

Ah yeah let's start with #1 before we make it as a default for SDK

@billyvg
Copy link
Member Author

billyvg commented Nov 20, 2023

Added this to sentry's config in https://github.com/getsentry/getsentry/pull/11728 -- we can re-open if we want to make this default for sdk.

@billyvg billyvg closed this as completed Nov 20, 2023
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

No branches or pull requests

2 participants