1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Fix the telemetry for the new alt-text flow

This commit is contained in:
Calixte Denizet 2024-08-15 11:29:00 +01:00
parent 8446d3ac03
commit 9bd00859d3
2 changed files with 3 additions and 3 deletions

View file

@ -78,7 +78,7 @@ class AltText {
if (this.#useNewAltTextFlow) {
this.#editor._reportTelemetry({
action: "pdfjs.image.alt_text.image_status_label_clicked",
label: this.#label,
data: { label: this.#label },
});
}
};
@ -237,7 +237,7 @@ class AltText {
const type = label === "review" ? "to-review" : label;
this.#editor._reportTelemetry({
action: "pdfjs.image.alt_text.image_status_label_displayed",
label,
data: { label },
});
button.classList.toggle("done", !!this.#altText);
AltText._l10nPromise

View file

@ -108,7 +108,7 @@ class StampEditor extends AnnotationEditor {
get telemetryFinalData() {
return {
type: "stamp",
hasAltText: this.hasAltTextData(),
hasAltText: !!this.altTextData?.altText,
};
}