Because:
- Settings buttons that open a modal call event.stopPropagation() to keep the
opening click from bubbling to the modal's outside-click handler and closing
it. Glean's auto-element-click listener is a bubble-phase listener on
document, so stopPropagation also stops those clicks from being recorded.
account_pref_passkey_delete_submit, two_step_auth_disable_click, and
revealModal primary CTAs (e.g. account_pref_two_step_auth_add_click) never
reached Looker.
This commit:
- Records the click explicitly via GleanMetrics.handleClickEvent in the passkey
delete handler and in ModalButton (guarded on gleanDataAttrs), preserving the
stopPropagation modal behavior.
- Plumbs ctaGleanDataAttrs into the primary ModalButton, which previously
received no glean data attrs at all.
- Adds regression tests for the passkey delete click and both modal buttons.
Closes #FXA-13881