File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ export class AccessibilityManager extends Disposable {
5757 ) {
5858 super ( ) ;
5959 this . _accessibilityTreeRoot = document . createElement ( 'div' ) ;
60- this . _terminal . element ?. insertAdjacentElement ( 'afterbegin' , this . _accessibilityTreeRoot ) ;
6160 this . _accessibilityTreeRoot . classList . add ( 'xterm-accessibility' ) ;
6261 this . _accessibilityTreeRoot . tabIndex = 0 ;
6362
@@ -89,14 +88,13 @@ export class AccessibilityManager extends Disposable {
8988 if ( ! this . _terminal . element ) {
9089 throw new Error ( 'Cannot enable accessibility before Terminal.open' ) ;
9190 }
91+ this . _terminal . element . insertAdjacentElement ( 'afterbegin' , this . _accessibilityTreeRoot ) ;
9292
9393 this . _accessiblityBuffer = document . createElement ( 'textarea' ) ;
9494 this . _accessiblityBuffer . ariaLabel = Strings . accessibilityBuffer ;
95- this . _accessiblityBuffer . readOnly = true ;
9695 this . _accessiblityBuffer . classList . add ( 'xterm-accessibility-buffer' ) ;
9796 this . _accessiblityBuffer . addEventListener ( 'focus' , ( ) => this . _refreshAccessibilityBuffer ( ) ) ;
98- this . _terminal . element . insertAdjacentElement ( 'afterbegin' , this . _accessiblityBuffer ) ;
99-
97+ this . _accessibilityTreeRoot . appendChild ( this . _accessiblityBuffer ) ;
10098
10199 this . register ( this . _renderRowsDebouncer ) ;
102100 this . register ( this . _terminal . onResize ( e => this . _handleResize ( e . rows ) ) ) ;
You can’t perform that action at this time.
0 commit comments