From 7dc6c73e33331f4cc3a9306a2150f20e594789c0 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Thu, 4 Jan 2007 01:13:26 +0000 Subject: [PATCH] users with screenreader flag set should only see 1 link to manual refresh chat rooms --- mod/chat/view.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mod/chat/view.php b/mod/chat/view.php index ee107d4300..edba6aee3c 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -104,10 +104,20 @@ if (has_capability('mod/chat:chat',$context)) { print_simple_box_start('center'); - link_to_popup_window ("/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam", + // users with screenreader set, will only see 1 link, to the manual refresh page + // for better accessibility + if ($USER->screenreader) { + $chattarget = "/mod/chat/gui_basic/index.php?id=$chat->id$groupparam"; + } else { + $chattarget = "/mod/chat/gui_$CFG->chat_method/index.php?id=$chat->id$groupparam"; + } + + link_to_popup_window ($chattarget, "chat$course->id$chat->id$groupparam", "$strenterchat", 500, 700, get_string('modulename', 'chat')); print_simple_box_end(); - if ($CFG->chat_method == 'header_js') { + + // if user is using screen reader, then there is no need to display this link again + if ($CFG->chat_method == 'header_js' && !$USER->screenreader) { // show frame/js-less alternative print_simple_box_start('center'); link_to_popup_window ("/mod/chat/gui_basic/index.php?id=$chat->id$groupparam", -- 2.39.5