Remove notebook view from focus order & accessibility tree when hidden (#209059)

* Remove notebook view from focus order when hidden

* Set `inert` on the correct container
This commit is contained in:
Kyle Cutler 2024-03-29 09:07:07 -07:00 committed by GitHub
parent cea6ec5f56
commit 9d98da3186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -409,6 +409,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
this._overlayContainer.id = `notebook-${id}`;
this._overlayContainer.className = 'notebookOverlay';
this._overlayContainer.classList.add('notebook-editor');
this._overlayContainer.inert = true;
this._overlayContainer.style.visibility = 'hidden';
container.appendChild(this._overlayContainer);
@ -1839,6 +1840,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
this._list.updateOptions({ paddingBottom: this._allowScrollBeyondLastLine() ? Math.max(0, (newCellListHeight - 50)) : 0, paddingTop: 0 });
}
this._overlayContainer.inert = false;
this._overlayContainer.style.visibility = 'visible';
this._overlayContainer.style.display = 'block';
this._overlayContainer.style.position = 'absolute';
@ -1968,6 +1970,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
onWillHide() {
this._isVisible = false;
this._editorFocus.set(false);
this._overlayContainer.inert = true;
this._overlayContainer.style.visibility = 'hidden';
this._overlayContainer.style.left = '-50000px';
this._notebookTopToolbarContainer.style.display = 'none';