@@ -192,6 +192,11 @@ class SignatureEditor extends DrawingEditor {
192192 this . div . hidden = true ;
193193 this . _uiManager . getSignature ( this ) ;
194194 }
195+ } else {
196+ this . div . setAttribute (
197+ "data-l10n-args" ,
198+ JSON . stringify ( { description : this . #description || "" } )
199+ ) ;
195200 }
196201
197202 if ( _isCopy ) {
@@ -217,6 +222,10 @@ class SignatureEditor extends DrawingEditor {
217222
218223 set description ( description ) {
219224 this . #description = description ;
225+ if ( ! this . div ) {
226+ return ;
227+ }
228+ this . div . setAttribute ( "data-l10n-args" , JSON . stringify ( { description } ) ) ;
220229 super . addEditToolbar ( ) . then ( toolbar => {
221230 toolbar ?. updateEditSignatureButton ( description ) ;
222231 } ) ;
@@ -256,7 +265,6 @@ class SignatureEditor extends DrawingEditor {
256265 const { outline } = ( this . #signatureData = data ) ;
257266 this . #isExtracted = outline instanceof ContourDrawOutline ;
258267 this . description = description ;
259- this . div . setAttribute ( "data-l10n-args" , JSON . stringify ( { description } ) ) ;
260268 let drawingOptions ;
261269 if ( this . #isExtracted) {
262270 drawingOptions = SignatureEditor . getDefaultDrawingOptions ( ) ;
@@ -428,7 +436,7 @@ class SignatureEditor extends DrawingEditor {
428436 static async deserialize ( data , parent , uiManager ) {
429437 const editor = await super . deserialize ( data , parent , uiManager ) ;
430438 editor . #isExtracted = data . areContours ;
431- editor . # description = data . accessibilityData ?. alt || "" ;
439+ editor . description = data . accessibilityData ?. alt || "" ;
432440 editor . #signatureUUID = data . uuid ;
433441 return editor ;
434442 }
0 commit comments