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

Turn on accessibility in xterm.js #6359

Merged
merged 2 commits into from May 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/terminal/src/constants.ts
Expand Up @@ -96,6 +96,13 @@ export namespace ITerminal {
* An optional command to run when the session starts.
*/
initialCommand: string;

/**
* Wether to enable screen reader support.
*
* Set to false if you run into performance problems from DOM overhead
*/
screenReaderMode: boolean;
}

/**
Expand All @@ -109,7 +116,8 @@ export namespace ITerminal {
scrollback: 1000,
shutdownOnClose: false,
cursorBlink: true,
initialCommand: ''
initialCommand: '',
screenReaderMode: true
};

/**
Expand Down
5 changes: 4 additions & 1 deletion packages/terminal/src/widget.ts
Expand Up @@ -46,7 +46,10 @@ export class Terminal extends Widget implements ITerminal.ITerminal {
this._options = { ...ITerminal.defaultOptions, ...options };

const { initialCommand, theme, ...other } = this._options;
const xtermOptions = { theme: Private.getXTermTheme(theme), ...other };
const xtermOptions = {
theme: Private.getXTermTheme(theme),
...other
};

this.addClass(TERMINAL_CLASS);

Expand Down