[LON-CAPA-cvs] cvs: loncom /interface lonpreferences.pm
raeburn
raeburn at source.lon-capa.org
Wed Mar 5 00:24:42 EST 2025
raeburn Wed Mar 5 05:24:42 2025 EDT
Modified files:
/loncom/interface lonpreferences.pm
Log:
- WCAG 2 compliance.
-------------- next part --------------
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.246 loncom/interface/lonpreferences.pm:1.247
--- loncom/interface/lonpreferences.pm:1.246 Wed Mar 5 02:27:00 2025
+++ loncom/interface/lonpreferences.pm Wed Mar 5 05:24:42 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.246 2025/03/05 02:27:00 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.247 2025/03/05 05:24:42 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -491,24 +491,24 @@
text => 'Change Screen Name'});
$r->print(Apache::loncommon::start_page('Personal Data'));
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name'));
- $r->print('<p>'
+ $r->print('<div class="LC_landmark" role="main"><p>'
.&mt('Change the name that is displayed in your posts.')
.'</p>'
);
$r->print('<form name="prefs" action="/adm/preferences" method="post">'
.'<input type="hidden" name="action" value="verify_and_change_screenname" />'
.&Apache::lonhtmlcommon::start_pick_box()
- .&Apache::lonhtmlcommon::row_title(&mt('Screenname').' '.&mt('(shown if you post anonymously)'))
- .'<input type="text" size="20" value="'.$screenname.'" name="screenname" />'
+ .&Apache::lonhtmlcommon::row_title('<label for="screenname">'.&mt('Screenname').'</label> '.&mt('(shown if you post anonymously)'))
+ .'<input type="text" size="20" value="'.$screenname.'" name="screenname" id="screenname" />'
.&Apache::lonhtmlcommon::row_closure()
- .&Apache::lonhtmlcommon::row_title(&mt('Nickname').' '.&mt('(shown if you post non-anonymously)'))
- .'<input type="text" size="20" value="'.$nickname.'" name="nickname" />'
+ .&Apache::lonhtmlcommon::row_title('<label for="nickname">'.&mt('Nickname').'</label> '.&mt('(shown if you post non-anonymously)'))
+ .'<input type="text" size="20" value="'.$nickname.'" name="nickname" id="nickname" />'
.&Apache::lonhtmlcommon::row_closure()
- .&Apache::lonhtmlcommon::row_title()
+ .&Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.&mt('Submit').':</span>','','','',1)
.'<input type="submit" value="'.&mt('Save').'" />'
.&Apache::lonhtmlcommon::row_closure(1)
.&Apache::lonhtmlcommon::end_pick_box()
- .'</form>'
+ .'</form></div>'
);
}
@@ -1192,7 +1192,7 @@
my $resetbuttondesc = &mt('Reset All Colors to Default');
my $colorchooser=&Apache::lonhtmlcommon::color_picker();
$r->print('<script type="text/javascript" language="JavaScript">
-// <![CDATA[' ."\n".' . $colorchooser . '."\n". '
+// <![CDATA[' ."\n". $colorchooser . "\n". '
// ]]>
</script>
');
@@ -1276,7 +1276,8 @@
text => 'Change Password'});
unless ($caller eq 'reset_by_email') {
$r->print(Apache::loncommon::start_page('Personal Data'));
- $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password').
+ '<div class="LC_landmark" role="main">');
}
if ((!defined($caller)) || ($caller eq 'preferences')) {
$user = $env{'user.name'};
@@ -1375,7 +1376,7 @@
$r->print(<<ENDFORM);
$errormessage
-<p>
+<p></p>
<!-- We separate the forms into 'server' and 'client' in order to
ensure that unencrypted passwords will not be sent out by a
crappy browser -->
@@ -1562,16 +1563,16 @@
} else {
$output .= &Apache::lonhtmlcommon::row_title(
'<label for="currentpass">'.$lt{'currentpass'}.'</label>')
- .'<input type="password" name="currentpass" size="20"/>'
+ .'<input type="password" name="currentpass" id="currentpass" size="20" />'
.&Apache::lonhtmlcommon::row_closure();
}
$output .= &Apache::lonhtmlcommon::row_title(
'<label for="newpass_1">'.$lt{'newpass'}.'</label>')
- .'<input type="password" name="newpass_1" size="20" />'
+ .'<input type="password" name="newpass_1" id="newpass_1" size="20" />'
.&Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title(
'<label for="newpass_2">'.$lt{'confirmpass'}.'</label>')
- .'<input type="password" name="newpass_2" size="20" />'
+ .'<input type="password" name="newpass_2" id="newpass_2" size="20" />'
.&Apache::lonhtmlcommon::row_closure(1)
.&Apache::lonhtmlcommon::end_pick_box();
if ($caller eq 'reset_by_email') {
@@ -1586,7 +1587,6 @@
<input type="hidden" name="ukey_npass2" value="$hexkey->{'ukey_npass2'}" />
<input type="hidden" name="lkey_npass2" value="$hexkey->{'lkey_npass2'}" />
</form>
-</p>
|;
return $output;
}
@@ -2618,6 +2618,7 @@
permission => $permissions{'aboutme'},
#help => 'Prefs_About_Me',
icon => 'system-users.png',
+ alttext => 'About Me Icon',
linktitle => 'Edit information about yourself that should be displayed on your public profile.'
},
{ linktext => 'Screen Name',
@@ -2625,6 +2626,7 @@
permission => 'F',
#help => 'Prefs_Screen_Name_Nickname',
icon => 'preferences-desktop-font.png',
+ alttext => 'Nickname Icon',
linktitle => 'Change the name that is displayed in your posts.'
},
]
@@ -2636,6 +2638,7 @@
permission => 'F',
#help => 'Prefs_Language',
icon => 'preferences-desktop-locale.png',
+ alttext => 'Language Icon',
linktitle => 'Choose the default language for this user.'
},
{ linktext => $role.' Page',
@@ -2643,6 +2646,7 @@
permission => 'F',
#help => '',
icon => 'role_hotlist.png',
+ alttext => 'Switch Role Icon',
linktitle => 'Configure the roles hotlist.'
},
{ linktext => 'Math display settings',
@@ -2650,6 +2654,7 @@
permission => 'F',
#help => '',
icon => 'dismath.png',
+ alttext => 'Math Icon',
linktitle => 'Change how math is displayed.'
},
{
@@ -2658,6 +2663,7 @@
permission => $permissions{'timezone'},
#help => '',
icon => 'timezone.png',
+ alttext => 'Clock Icon',
linktitle => 'Set your time zone.',
}
]
@@ -2669,6 +2675,7 @@
permission => 'F',
#help => 'Change_Colors',
icon => 'preferences-desktop-theme.png',
+ alttext => 'Colors Icon',
linktitle => 'Change LON-CAPA default colors.'
},
{ linktext => 'Menu Display',
@@ -2676,6 +2683,7 @@
permission => 'F',
#help => '',
icon => 'preferences-system-windows.png',
+ alttext => 'Menus Icon',
linktitle => 'Change whether the menus are displayed with icons or icons and text.'
}
]
@@ -2687,6 +2695,7 @@
permission => 'F',
#help => 'Prefs_Messages',
icon => 'mail-reply-all.png',
+ alttext => 'Notifications Icon',
linktitle => 'Change messageforwarding or notifications settings.'
},
{ linktext => 'Discussion Display',
@@ -2694,6 +2703,7 @@
permission => 'F',
#help => 'Change_Discussion_Display',
icon => 'chat.png',
+ alttext => 'Discussions Icon',
linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'
},
]
@@ -2708,6 +2718,7 @@
url => '/adm/preferences?action=authorsettings',
permission => 'F',
icon => 'codemirror.png',
+ alttext => 'Coding Icon',
linktitle => 'Settings for your authoring space.',
},
]
@@ -2720,6 +2731,7 @@
permission => 'F',
#help => '',
icon => 'system-lock-screen.png',
+ alttext => 'Lock Icon',
linktitle => 'Restrict domain coordinator access.',
});
}
@@ -2732,6 +2744,7 @@
permission => 'F',
#help => '',
icon => 'network-workgroup.png',
+ alttext => 'Clicker Icon',
linktitle => 'Register your clicker.'
},
]
@@ -2745,6 +2758,7 @@
permission => 'F',
#help => 'Change_Password',
icon => 'emblem-readonly.png',
+ alttext => 'Secure Icon',
linktitle => 'Change your password.',
});
}
@@ -2756,6 +2770,7 @@
permission => 'F',
#help => '',
icon => 'system-lock-screen.png',
+ alttext => 'Screen Lock Icon',
linktitle => 'Allow/disallow propagation of name changes from institutional directory service',
});
}
@@ -2769,6 +2784,7 @@
permission => 'F',
#help => '',
icon => 'course_ini.png',
+ alttext => 'Course Launch Icon',
linktitle => 'Set the default page to be displayed when you select a course role.',
});
@@ -2781,14 +2797,15 @@
permission => 'F',
#help => '',
icon => 'blog.png',
+ alttext => 'Debugging Icon',
linktitle => 'Toggle Debug Messages.',
});
}
$r->print(&Apache::loncommon::start_page('My Space'));
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences'));
- $r->print($message);
- $r->print(Apache::lonhtmlcommon::generate_menu(@menu));
+ $r->print('<div class="LC_landmark" role="main">'."\n".$message);
+ $r->print(Apache::lonhtmlcommon::generate_menu(@menu)."\n".'</div>');
$r->print(Apache::loncommon::end_page());
}
@@ -2841,6 +2858,7 @@
$ended = 1;
}elsif($env{'form.action'} eq 'changepass'){
&passwordchanger($r);
+ $r->print('</div>');
}elsif($env{'form.action'} eq 'verify_and_change_pass'){
&verify_and_change_password($r,'preferences','','','',\$ended);
}elsif($env{'form.action'} eq 'changescreenname'){
More information about the LON-CAPA-cvs
mailing list