Skip to content

Commit

Permalink
Merge pull request #6359 from yuvipanda/xterm-screenreader
Browse files Browse the repository at this point in the history
Turn on accessibility in xterm.js
  • Loading branch information
ian-r-rose committed May 15, 2019
2 parents 223c63e + 6a115b4 commit 1b7b564
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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

0 comments on commit 1b7b564

Please sign in to comment.