File tree 3 files changed +10
-0
lines changed
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ editor_ink_canvas_aria_label=User-created image
268
268
# LOCALIZATION NOTE (editor_alt_text_button_label): Alternative text (alt text) helps
269
269
# when people can't see the image.
270
270
editor_alt_text_button_label =Alt text
271
+ editor_alt_text_edit_button_label =Edit alt text
271
272
editor_alt_text_dialog_label =Choose an option
272
273
editor_alt_text_dialog_description =Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.
273
274
editor_alt_text_add_description_label =Add a description
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ class AnnotationEditor {
150
150
AnnotationEditor . _l10nPromise ||= new Map (
151
151
[
152
152
"editor_alt_text_button_label" ,
153
+ "editor_alt_text_edit_button_label" ,
153
154
"editor_alt_text_decorative_tooltip" ,
154
155
] . map ( str => [ str , l10n . get ( str ) ] )
155
156
) ;
@@ -831,6 +832,7 @@ class AnnotationEditor {
831
832
. get ( "editor_alt_text_button_label" )
832
833
. then ( msg => {
833
834
altText . textContent = msg ;
835
+ altText . setAttribute ( "aria-label" , msg ) ;
834
836
} ) ;
835
837
altText . tabIndex = "0" ;
836
838
altText . addEventListener (
@@ -865,6 +867,12 @@ class AnnotationEditor {
865
867
if ( ! button || ( ! this . #altTextDecorative && ! this . #altText) ) {
866
868
return ;
867
869
}
870
+ AnnotationEditor . _l10nPromise
871
+ . get ( "editor_alt_text_edit_button_label" )
872
+ . then ( msg => {
873
+ button . setAttribute ( "aria-label" , msg ) ;
874
+ } ) ;
875
+
868
876
let tooltip = this . #altTextTooltip;
869
877
if ( ! tooltip ) {
870
878
this . #altTextTooltip = tooltip = document . createElement ( "span" ) ;
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ const DEFAULT_L10N_STRINGS = {
83
83
editor_ink2_aria_label : "Draw Editor" ,
84
84
editor_ink_canvas_aria_label : "User-created image" ,
85
85
editor_alt_text_button_label : "Alt text" ,
86
+ editor_alt_text_edit_button_label : "Edit alt text" ,
86
87
editor_alt_text_decorative_tooltip : "Marked as decorative" ,
87
88
} ;
88
89
if ( typeof PDFJSDev === "undefined" || ! PDFJSDev . test ( "MOZCENTRAL" ) ) {
You can’t perform that action at this time.
0 commit comments