microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.51k stars 28.66k forks source link

accessible view go to symbol is not showing #212994

Open meganrogge opened 4 months ago

meganrogge commented 4 months ago
  1. focus a chat response
  2. use alt+f2 with screen reader mode enabled
  3. use ctrlCmd+shift+o to go to symbol
  4. 🐛 it doesn't work
meganrogge commented 3 months ago

need to port the terminal accessibility help over to using the new accessible view registry

it's returning here bc it's not an instance of AdvancedContentProvider

https://github.com/microsoft/vscode/blob/96c4141fa6b4f3d3672bd6623c1a39f46200b367/src/vs/workbench/contrib/accessibility/browser/accessibleView.ts#L346

meganrogge commented 3 months ago

getProvider is not async, so this would be a bit involved

AccessibleViewRegistry.register({
    type: AccessibleViewType.Help,
    priority: 105,
    name: 'terminal',
    getProvider: (accessor) => {
        const instantiationService = accessor.get(IInstantiationService);
        const terminalService = accessor.get(ITerminalService);
        terminalService.getActiveOrCreateInstance().then(async instance => {
            await terminalService.revealActiveTerminal();
            const terminal = instance?.xterm;
            if (!terminal) {
                return;
            }
            return instantiationService.createInstance(TerminalAccessibilityHelpProvider, instance, terminal);
        });
    }
});
meganrogge commented 2 months ago

we can now use onDidChangeContent, so this should be doable