@@ -1134,6 +1134,7 @@ define([
11341134 var cell = this . get_cell ( i ) ;
11351135
11361136 $ ( '#undelete_cell' ) . addClass ( 'disabled' ) ;
1137+ $ ( '#undelete_cell > a' ) . attr ( 'aria-disabled' , 'true' ) ;
11371138 if ( this . is_valid_cell_index ( i ) ) {
11381139 var old_ncells = this . ncells ( ) ;
11391140 var ce = this . get_cell_element ( i ) ;
@@ -1213,7 +1214,7 @@ define([
12131214 // where they came from. It will do until we have proper undo support.
12141215 undelete_backup . index = cursor_ix_after ;
12151216 $ ( '#undelete_cell' ) . removeClass ( 'disabled' ) ;
1216-
1217+ $ ( '#undelete_cell > a' ) . attr ( 'aria-disabled' , 'false' ) ;
12171218 this . undelete_backup_stack . push ( undelete_backup ) ;
12181219 this . set_dirty ( true ) ;
12191220
@@ -1256,6 +1257,7 @@ define([
12561257 }
12571258 if ( this . undelete_backup_stack . length === 0 ) {
12581259 $ ( '#undelete_cell' ) . addClass ( 'disabled' ) ;
1260+ $ ( '#undelete_cell > a' ) . attr ( 'aria-disabled' , 'true' ) ;
12591261 }
12601262 } ;
12611263
@@ -1618,12 +1620,15 @@ define([
16181620 $ ( '#paste_cell_replace' ) . removeClass ( 'disabled' )
16191621 . on ( 'click' , function ( ) { that . keyboard_manager . actions . call (
16201622 'jupyter-notebook:paste-cell-replace' ) ; } ) ;
1623+ $ ( '#paste_cell_replace > a' ) . attr ( 'aria-disabled' , 'false' ) ;
16211624 $ ( '#paste_cell_above' ) . removeClass ( 'disabled' )
16221625 . on ( 'click' , function ( ) { that . keyboard_manager . actions . call (
16231626 'jupyter-notebook:paste-cell-above' ) ; } ) ;
1627+ $ ( '#paste_cell_above > a' ) . attr ( 'aria-disabled' , 'false' ) ;
16241628 $ ( '#paste_cell_below' ) . removeClass ( 'disabled' )
16251629 . on ( 'click' , function ( ) { that . keyboard_manager . actions . call (
16261630 'jupyter-notebook:paste-cell-below' ) ; } ) ;
1631+ $ ( '#paste_cell_below > a' ) . attr ( 'aria-disabled' , 'false' ) ;
16271632 this . paste_enabled = true ;
16281633 }
16291634 } ;
@@ -1634,8 +1639,11 @@ define([
16341639 Notebook . prototype . disable_paste = function ( ) {
16351640 if ( this . paste_enabled ) {
16361641 $ ( '#paste_cell_replace' ) . addClass ( 'disabled' ) . off ( 'click' ) ;
1642+ $ ( '#paste_cell_replace > a' ) . attr ( 'aria-disabled' , 'true' ) ;
16371643 $ ( '#paste_cell_above' ) . addClass ( 'disabled' ) . off ( 'click' ) ;
1644+ $ ( '#paste_cell_above > a' ) . attr ( 'aria-disabled' , 'true' ) ;
16381645 $ ( '#paste_cell_below' ) . addClass ( 'disabled' ) . off ( 'click' ) ;
1646+ $ ( '#paste_cell_below > a' ) . attr ( 'aria-disabled' , 'true' ) ;
16391647 this . paste_enabled = false ;
16401648 }
16411649 } ;
@@ -1924,6 +1932,7 @@ define([
19241932 Notebook . prototype . disable_attachments_paste = function ( ) {
19251933 if ( this . paste_attachments_enabled ) {
19261934 $ ( '#paste_cell_attachments' ) . addClass ( 'disabled' ) ;
1935+ $ ( '#paste_cell_attachments > a' ) . attr ( 'disabled' , 'true' ) ;
19271936 this . paste_attachments_enabled = false ;
19281937 }
19291938 } ;
@@ -1934,6 +1943,7 @@ define([
19341943 Notebook . prototype . enable_attachments_paste = function ( ) {
19351944 if ( ! this . paste_attachments_enabled ) {
19361945 $ ( '#paste_cell_attachments' ) . removeClass ( 'disabled' ) ;
1946+ $ ( '#paste_cell_attachments > a' ) . attr ( 'aria-disabled' , 'false' ) ;
19371947 this . paste_attachments_enabled = true ;
19381948 }
19391949 } ;
@@ -1944,8 +1954,10 @@ define([
19441954 Notebook . prototype . set_insert_image_enabled = function ( enabled ) {
19451955 if ( enabled ) {
19461956 $ ( '#insert_image' ) . removeClass ( 'disabled' ) ;
1957+ $ ( '#insert_image > a' ) . attr ( 'aria-disabled' , 'false' ) ;
19471958 } else {
19481959 $ ( '#insert_image' ) . addClass ( 'disabled' ) ;
1960+ $ ( '#insert_image > a' ) . attr ( 'aria-disabled' , 'true' ) ;
19491961 }
19501962 } ;
19511963
0 commit comments