mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
users with screenreader flag set should only see 1 link to manual refresh chat rooms
This commit is contained in:
parent
b776b27738
commit
7dc6c73e33
1 changed files with 12 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue