Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait for context view to hide so screen reader detects focus change, add toolbar #189950

Merged
merged 7 commits into from
Aug 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions src/vs/workbench/contrib/accessibility/browser/accessibleView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,21 @@ class AccessibleView extends Disposable {
const previousProvider = Object.assign({}, this._currentProvider);
const accessibleViewHelpProvider = Object.assign({}, this._currentProvider);
accessibleViewHelpProvider.options.type = AccessibleViewType.Help;
accessibleViewHelpProvider.provideContent = () => this._getAccessibleViewHelpDialogContent(accessibleViewHelpProvider!);
accessibleViewHelpProvider.provideContent = () => this._getAccessibleViewHelpDialogContent(accessibleViewHelpProvider);
accessibleViewHelpProvider.onClose = () => this.show(previousProvider);
this._accessiblityHelpIsShown.set(true);
const delegate: IContextViewDelegate = {
getAnchor: () => { return { x: (window.innerWidth / 2) - ((Math.min(this._layoutService.dimension.width * 0.62 /* golden cut */, DIMENSIONS.MAX_WIDTH)) / 2), y: this._layoutService.offset.quickPickTop }; },
render: (container) => {
container.classList.add('accessible-view-container');
return this._render(accessibleViewHelpProvider, container, true);
},
};
this._contextViewService.showContextView(delegate);
accessibleViewHelpProvider.options.ariaLabel = localize('accessibleViewHelp', "Accessible View Help");
this._contextViewService.hideContextView();
setTimeout(() => {
this._accessiblityHelpIsShown.set(true);
const delegate: IContextViewDelegate = {
getAnchor: () => { return { x: (window.innerWidth / 2) - ((Math.min(this._layoutService.dimension.width * 0.62 /* golden cut */, DIMENSIONS.MAX_WIDTH)) / 2), y: this._layoutService.offset.quickPickTop }; },
render: (container) => {
container.classList.add('accessible-view-container');
return this._render(accessibleViewHelpProvider, container, true);
},
};
this._contextViewService.showContextView(delegate);
}, 100);
meganrogge marked this conversation as resolved.
Show resolved Hide resolved
}

private _getAccessibleViewHelpDialogContent(provider: IAccessibleContentProvider): string {
Expand Down Expand Up @@ -407,7 +411,7 @@ class AccessibleView extends Disposable {
let goToSymbolHint = '';
if (hasSymbolProvider) {
if (goToSymbolKb) {
goToSymbolHint = localize('goToSymbolHint', 'Go to a symbol within the accessible view (({0}).', goToSymbolKb);
goToSymbolHint = localize('goToSymbolHint', 'Go to a symbol within the accessible view ({0}).', goToSymbolKb);
} else {
goToSymbolHint = localize('goToSymbolHintNoKb', 'To go to a symbol within the accessible view, configure a keybinding for the command Go To Symbol in Accessible View.', goToSymbolKb);
}
Expand Down