From 9135fa916ba81819057bff4c1dfcefae49e019d1 Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 19 Jul 2023 00:07:55 +0300 Subject: [PATCH] Add screen reader optional support in Terminal module --- xterm/config | 1 + xterm/config.info | 1 + xterm/index.cgi | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xterm/config b/xterm/config index 2d40a006c..b6693259a 100644 --- a/xterm/config +++ b/xterm/config @@ -2,3 +2,4 @@ xterm=xterm-256color base_port=555 rcfile=0 locale=0 +screen_reader=false diff --git a/xterm/config.info b/xterm/config.info index 3b8ae0710..cdba0707c 100644 --- a/xterm/config.info +++ b/xterm/config.info @@ -4,3 +4,4 @@ host=Hostname for WebSocket connections,3,Automatic,32,,,Manual size=Terminal width and height in characters,3,Automatic,5,,,Static (80x24) locale=Set shell character encoding,10,0-Shell default,1-en_US.UTF-8,Custom rcfile=Execute initialization commands from file,10,0-Shell default,1-Module default,Custom +screen_reader=Enable screen reader mode,1,true-Yes,false-No diff --git a/xterm/index.cgi b/xterm/index.cgi index 4a5425abe..1a8e49314 100755 --- a/xterm/index.cgi +++ b/xterm/index.cgi @@ -71,7 +71,7 @@ if ($conf_cols_n && $conf_rows_n && !$xmlhr) { } # Define columns and rows -$termjs_opts{'Options'} = "{ cols: $env_cols, rows: $env_rows }"; +$termjs_opts{'Options'} = "{ cols: $env_cols, rows: $env_rows, screenReaderMode: $config{'screen_reader'} || false }"; my $term_size = " min-width: ".($conf_cols_n ? "".($conf_cols_n * 9)."px" : "calc(100vw - 22px)").";