File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ page_scale_actual=Actual Size
223
223
page_scale_percent ={{scale}}%
224
224
225
225
# Loading indicator messages
226
+ loading =Loading…
226
227
loading_error =An error occurred while loading the PDF.
227
228
invalid_file_error =Invalid or corrupted PDF file.
228
229
missing_file_error =Missing PDF file.
Original file line number Diff line number Diff line change @@ -122,6 +122,12 @@ class PDFPageView {
122
122
div . style . width = Math . floor ( this . viewport . width ) + "px" ;
123
123
div . style . height = Math . floor ( this . viewport . height ) + "px" ;
124
124
div . setAttribute ( "data-page-number" , this . id ) ;
125
+ div . setAttribute ( "role" , "region" ) ;
126
+ this . l10n
127
+ . get ( "page_canvas" , { page : this . id } , "Page {{page}}" )
128
+ . then ( msg => {
129
+ div . setAttribute ( "aria-label" , msg ) ;
130
+ } ) ;
125
131
this . div = div ;
126
132
127
133
container . appendChild ( div ) ;
@@ -233,6 +239,10 @@ class PDFPageView {
233
239
234
240
this . loadingIconDiv = document . createElement ( "div" ) ;
235
241
this . loadingIconDiv . className = "loadingIcon" ;
242
+ this . loadingIconDiv . setAttribute ( "role" , "img" ) ;
243
+ this . l10n . get ( "loading" ) . then ( msg => {
244
+ this . loadingIconDiv ?. setAttribute ( "aria-label" , msg ) ;
245
+ } ) ;
236
246
div . appendChild ( this . loadingIconDiv ) ;
237
247
}
238
248
You can’t perform that action at this time.
0 commit comments