mjs and js
This commit is contained in:
@@ -151,7 +151,7 @@ export class AccessibilityManager extends Disposable {
|
||||
if (char === '\n') {
|
||||
this._liveRegionLineCount++;
|
||||
if (this._liveRegionLineCount === MAX_ROWS_TO_READ + 1) {
|
||||
this._liveRegion.textContent += Strings.tooMuchOutput;
|
||||
this._liveRegion.textContent += Strings.tooMuchOutput.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
|
||||
|
||||
this.textarea = this._document.createElement('textarea');
|
||||
this.textarea.classList.add('xterm-helper-textarea');
|
||||
this.textarea.setAttribute('aria-label', Strings.promptLabel);
|
||||
this.textarea.setAttribute('aria-label', Strings.promptLabel.get());
|
||||
if (!Browser.isChromeOS) {
|
||||
// ChromeVox on ChromeOS does not like this. See
|
||||
// https://issuetracker.google.com/issues/260170397
|
||||
|
||||
@@ -5,8 +5,19 @@
|
||||
|
||||
// This file contains strings that get exported in the API so they can be localized
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
export let promptLabel = 'Terminal input';
|
||||
let promptLabelInternal = 'Terminal input';
|
||||
const promptLabel = {
|
||||
get: () => promptLabelInternal,
|
||||
set: (value: string) => promptLabelInternal = value
|
||||
};
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
export let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';
|
||||
let tooMuchOutputInternal = 'Too much output to announce, navigate to rows manually to read';
|
||||
const tooMuchOutput = {
|
||||
get: () => tooMuchOutputInternal,
|
||||
set: (value: string) => tooMuchOutputInternal = value
|
||||
};
|
||||
|
||||
export {
|
||||
promptLabel,
|
||||
tooMuchOutput
|
||||
};
|
||||
|
||||
@@ -247,7 +247,13 @@ export class Terminal extends Disposable implements ITerminalApi {
|
||||
this._addonManager.loadAddon(this, addon);
|
||||
}
|
||||
public static get strings(): ILocalizableStrings {
|
||||
return Strings;
|
||||
// A wrapper is required here because esbuild prevents setting an `export let`
|
||||
return {
|
||||
get promptLabel(): string { return Strings.promptLabel.get(); },
|
||||
set promptLabel(value: string) { Strings.promptLabel.set(value); },
|
||||
get tooMuchOutput(): string { return Strings.tooMuchOutput.get(); },
|
||||
set tooMuchOutput(value: string) { Strings.tooMuchOutput.set(value); }
|
||||
};
|
||||
}
|
||||
|
||||
private _verifyIntegers(...values: number[]): void {
|
||||
|
||||
Reference in New Issue
Block a user