From e8763a08ab1a2cbbda994874853b60e571296120 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Sun, 25 Aug 2024 17:33:42 +0200 Subject: [PATCH] [Editor] Add a missing parameter in the telemetry for the new alt text flow (bug 1914480) --- src/display/editor/stamp.js | 2 +- web/new_alt_text_manager.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/display/editor/stamp.js b/src/display/editor/stamp.js index 24b17b007..e41aa2ac2 100644 --- a/src/display/editor/stamp.js +++ b/src/display/editor/stamp.js @@ -159,7 +159,7 @@ class StampEditor extends AnnotationEditor { ) { this._reportTelemetry({ action: "pdfjs.image.image_added", - data: { alt_text_modal: false }, + data: { alt_text_modal: false, alt_text_type: "empty" }, }); try { // The alt-text dialog isn't opened but we still want to guess the alt diff --git a/web/new_alt_text_manager.js b/web/new_alt_text_manager.js index a123d68c5..06588b320 100644 --- a/web/new_alt_text_manager.js +++ b/web/new_alt_text_manager.js @@ -416,7 +416,7 @@ class NewAltTextManager { }); this.#currentEditor._reportTelemetry({ action: "pdfjs.image.image_added", - data: { alt_text_modal: false }, + data: { alt_text_modal: true, alt_text_type: "skipped" }, }); this.#finish(); } @@ -464,7 +464,10 @@ class NewAltTextManager { } this.#currentEditor._reportTelemetry({ action: "pdfjs.image.image_added", - data: { alt_text_modal: true }, + data: { + alt_text_modal: true, + alt_text_type: altText ? "present" : "empty", + }, }); this.#currentEditor._reportTelemetry({