diff --git a/README.md b/README.md index a874c36..71040a4 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Please note: most of these features have been tested against [UNItopia](https:// - ANSI support The received text is displayed with ANSI color codes, providing a colorful and user-friendly representation in the frontend. + Screen altering commands like Clear Screen are also supported + + The client applies a web-optimized ANSI color palette compliant with WCAG AAA. + Low-contrast foreground/background combinations are detected and corrected automatically to maintain readability. There is [work in progress](https://github.com/unitopia-de/webmud3/milestone/11). @@ -41,7 +45,11 @@ We are currently working on the following features: - GMCP Support - _Not planned yet_ + [Milestone](https://github.com/unitopia-de/webmud3/milestone/17) + +- Screenreader Support + + [Milestone](https://github.com/unitopia-de/webmud3/milestone/15) ## Deployments diff --git a/frontend/jest.config.js b/frontend/jest.config.js index d44f012..c94d93e 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -1,6 +1,6 @@ // jest.config.js module.exports = { preset: 'jest-preset-angular', - setupFilesAfterEnv: ['/setup-jest.ts'], - passWithNoTests: true + passWithNoTests: true, + silent: true }; diff --git a/frontend/setup-jest.ts b/frontend/setup-jest.ts deleted file mode 100644 index 22d2d05..0000000 --- a/frontend/setup-jest.ts +++ /dev/null @@ -1 +0,0 @@ -// import 'jest-preset-angular/setup-jest'; diff --git a/frontend/src/app/core/mud/components/mud-client/mud-client.component.ts b/frontend/src/app/core/mud/components/mud-client/mud-client.component.ts index d8cc2a1..bf4550e 100644 --- a/frontend/src/app/core/mud/components/mud-client/mud-client.component.ts +++ b/frontend/src/app/core/mud/components/mud-client/mud-client.component.ts @@ -125,9 +125,12 @@ export class MudClientComponent implements AfterViewInit, OnDestroy { constructor() { this.terminal = new Terminal({ fontFamily: 'JetBrainsMono, monospace', - theme: { background: '#000', foreground: '#ccc' }, disableStdin: false, screenReaderMode: false, + // This settings will adjust all colors to ensure sufficient contrast ratio for accessibility + // between text and background colors. This may alter the original color scheme. + // For more information, see: https://xtermjs.org/docs/api/terminal/interfaces/iterminaloptions/#optional-minimumcontrastratio + minimumContrastRatio: 7, // Default value for WCAG AAA compliance }); this.inputController = new MudInputController( diff --git a/frontend/src/app/features/terminal/mud-screenreader.spec.ts b/frontend/src/app/features/terminal/mud-screenreader.spec.ts index b859902..62e075c 100644 --- a/frontend/src/app/features/terminal/mud-screenreader.spec.ts +++ b/frontend/src/app/features/terminal/mud-screenreader.spec.ts @@ -31,7 +31,7 @@ describe('MudScreenReaderAnnouncer', () => { it('clear() empties the live region immediately', () => { announcer.announce('Message'); - expect(liveRegion.textContent).toBe('Message'); + expect(liveRegion.textContent).toBe('Message\n'); announcer.clear(); expect(liveRegion.textContent).toBe('');