[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm loncoursequeueadmin.pm loncreatecourse.pm loncreateuser.pm lonmeta.pm lonsearchcat.pm slotrequest.pm
raeburn
raeburn at source.lon-capa.org
Tue Mar 18 14:57:29 EDT 2025
raeburn Tue Mar 18 18:57:29 2025 EDT
Modified files:
/loncom/interface loncommon.pm loncoursequeueadmin.pm
loncreatecourse.pm loncreateuser.pm lonmeta.pm
lonsearchcat.pm slotrequest.pm
Log:
- WCAG 2 compliance.
-------------- next part --------------
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1470 loncom/interface/loncommon.pm:1.1471
--- loncom/interface/loncommon.pm:1.1470 Mon Mar 17 00:25:51 2025
+++ loncom/interface/loncommon.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1470 2025/03/17 00:25:51 raeburn Exp $
+# $Id: loncommon.pm,v 1.1471 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2800,7 +2800,7 @@
# ------------------------------------------
sub domain_select {
- my ($name,$value,$multiple,$incdoms,$excdoms)=@_;
+ my ($name,$value,$multiple,$incdoms,$excdoms,$id)=@_;
my @possdoms;
if (ref($incdoms) eq 'ARRAY') {
@possdoms = @{$incdoms};
@@ -2821,10 +2821,10 @@
if ($multiple) {
$domains{''}=&mt('Any domain');
$domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];
- return &multiple_select_form($name,$value,4,\%domains);
+ return &multiple_select_form($name,$value,4,\%domains,undef,$id);
} else {
$domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))];
- return &select_form($name,$value,\%domains);
+ return &select_form($name,$value,\%domains,'','',$id);
}
}
@@ -2836,7 +2836,7 @@
=over 4
-=item * &multiple_select_form($name,$value,$size,$hash,$order)
+=item * &multiple_select_form($name,$value,$size,$hash,$order,$id)
Returns a string containing a <select> element int multiple mode
@@ -2848,12 +2848,13 @@
$hash - the elements should be 'option' => 'shown text'
(shown text should already have been &mt())
$order - (optional) array ref of the order to show the elements in
+ $id = (optional) id for <select> element
=cut
#-------------------------------------------
sub multiple_select_form {
- my ($name,$value,$size,$hash,$order)=@_;
+ my ($name,$value,$size,$hash,$order,$id)=@_;
my %selected = map { $_ => 1 } ref($value)?@{$value}:($value);
my $output='';
if (! defined($size)) {
@@ -2862,7 +2863,10 @@
$size = scalar(keys(%$hash));
}
}
- $output.="\n".'<select name="'.$name.'" size="'.$size.'" multiple="multiple">';
+ if ($id ne '') {
+ $id = ' id="'.$id.'"';
+ }
+ $output.="\n".'<select name="'.$name.'" size="'.$size.'" multiple="multiple"'.$id.'>';
my @order;
if (ref($order) eq 'ARRAY') {
@order = @{$order};
@@ -2886,7 +2890,7 @@
=pod
-=item * &select_form($defdom,$name,$hashref,$onchange,$readonly)
+=item * &select_form($defdom,$name,$hashref,$onchange,$readonly,$id)
Returns a string containing a <select name='$name' size='1'> form to
allow a user to select options from a ref to a hash containing:
@@ -2894,7 +2898,8 @@
a javascript onchange item, e.g., onchange="this.form.submit();".
An optional arg -- $readonly -- if true will cause the select form
to be disabled, e.g., for the case where an instructor has a section-
-specific role, and is viewing/modifying parameters.
+specific role, and is viewing/modifying parameters. An optional arg
+-- $id -- will be used as the id attribute of the select element.
See lonrights.pm for an example invocation and use.
@@ -2902,7 +2907,7 @@
#-------------------------------------------
sub select_form {
- my ($def,$name,$hashref,$onchange,$readonly) = @_;
+ my ($def,$name,$hashref,$onchange,$readonly,$id) = @_;
return unless (ref($hashref) eq 'HASH');
if ($onchange) {
$onchange = ' onchange="'.$onchange.'"';
@@ -2911,7 +2916,10 @@
if ($readonly) {
$disabled = ' disabled="disabled"';
}
- my $selectform = "<select name=\"$name\" size=\"1\"$onchange$disabled>\n";
+ if ($id ne '') {
+ $id = ' id="'.$id.'"';
+ }
+ my $selectform = "<select name=\"$name\" size=\"1\"$onchange$disabled$id>\n";
my @keys;
if (exists($hashref->{'select_form_order'})) {
@keys=@{$hashref->{'select_form_order'}};
@@ -2962,7 +2970,7 @@
my $onchange = "javascript:toggleHistoryOptions(this,'containingphrase','$context',
'$secondid','$thirdid')";
return '<span class="LC_nobreak"><label>'.&mt('Records: [_1]',
- &Apache::lonmeta::selectbox('show',$env{'form.show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$env{'form.show'},'','',undef,
(&mt('all'),10,20,50,100,1000,10000))).
'</label></span> <span class="LC_nobreak">'.
&mt('Filter: [_1]',
@@ -3064,9 +3072,12 @@
}
sub select_level_form {
- my ($deflevel,$name)=@_;
+ my ($deflevel,$name,$id)=@_;
+ if ($id ne '') {
+ $id = ' id="'.$id.'"';
+ }
unless ($deflevel) { $deflevel=0; }
- my $selectform = "<select name=\"$name\" size=\"1\">\n";
+ my $selectform = "<select name=\"$name\" size=\"1\"$id>\n";
for (my $i=0; $i<=18; $i++) {
$selectform.="<option value=\"$i\" ".
($i==$deflevel ? 'selected="selected" ' : '').
@@ -4861,9 +4872,10 @@
sub filecategoryselect {
- my ($name,$value)=@_;
+ my ($name,$value,$id)=@_;
return &select_form($value,$name,
- {'' => &mt('Any category'), map { $_,$_ } sort(keys(%category_extensions))});
+ {'' => &mt('Any category'), map { $_,$_ } sort(keys(%category_extensions))},
+ '','',$id);
}
=pod
Index: loncom/interface/loncoursequeueadmin.pm
diff -u loncom/interface/loncoursequeueadmin.pm:1.69 loncom/interface/loncoursequeueadmin.pm:1.70
--- loncom/interface/loncoursequeueadmin.pm:1.69 Sat Aug 19 23:32:13 2023
+++ loncom/interface/loncoursequeueadmin.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Utilities to administer domain course requests and course self-enroll requests
#
-# $Id: loncoursequeueadmin.pm,v 1.69 2023/08/19 23:32:13 raeburn Exp $
+# $Id: loncoursequeueadmin.pm,v 1.70 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1074,7 +1074,7 @@
my $nolink = 1;
my $output = '<table><tr><td valign="top">'.
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b></span><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
(&mt('all'),5,10,20,50,100,1000,10000)).
'</td><td> </td>';
my $startform =
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.177 loncom/interface/loncreatecourse.pm:1.178
--- loncom/interface/loncreatecourse.pm:1.177 Wed Mar 29 16:01:13 2023
+++ loncom/interface/loncreatecourse.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.177 2023/03/29 16:01:13 raeburn Exp $
+# $Id: loncreatecourse.pm,v 1.178 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1251,7 +1251,7 @@
my ($contexts,$contextnames) = &context_names();
my $output = '<table><tr><td valign="top">'.
'<span class="LC_nobreak"><b>'.&mt('Records/page:').'</b></span><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
(&mt('all'),5,10,20,50,100,1000,10000)).
'</td><td> </td>';
my $startform =
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.484 loncom/interface/loncreateuser.pm:1.485
--- loncom/interface/loncreateuser.pm:1.484 Wed Feb 26 15:39:20 2025
+++ loncom/interface/loncreateuser.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.484 2025/02/26 15:39:20 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.485 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8612,7 +8612,7 @@
my $nolink = 1;
my $output = '<table><tr><td valign="top">'.
'<span class="LC_nobreak"><b>'.&mt('Actions/page:').'</b></span><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
(&mt('all'),5,10,20,50,100,1000,10000)).
'</td><td> </td>';
my $startform =
@@ -8702,7 +8702,7 @@
my $nolink = 1;
my $output = '<table><tr><td valign="top">'.
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b></span><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
(&mt('all'),5,10,20,50,100,1000,10000)).
'</td><td> </td>';
my $startform =
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.257 loncom/interface/lonmeta.pm:1.258
--- loncom/interface/lonmeta.pm:1.257 Tue Nov 7 21:31:11 2023
+++ loncom/interface/lonmeta.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.257 2023/11/07 21:31:11 raeburn Exp $
+# $Id: lonmeta.pm,v 1.258 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -550,7 +550,7 @@
}
sub selectbox {
- my ($name,$value,$readonly,$functionref, at idlist)=@_;
+ my ($name,$value,$readonly,$id,$functionref, at idlist)=@_;
if (! defined($functionref)) {
$functionref=\&direct;
}
@@ -558,7 +558,10 @@
if ($readonly) {
$disabled = ' disabled="disabled"';
}
- my $selout='<select name="'.$name.'">';
+ if ($id ne '') {
+ $id = ' id="'.$id.'"';
+ }
+ my $selout='<select name="'.$name.'"'.$id.'>';
foreach my $id (@idlist) {
$selout.='<option value="'.$id.'"'.$disabled;
if ($id eq $value) {
@@ -582,7 +585,7 @@
return $relatedsep.' ';
}
return $relatedsep.'<input type="checkbox" name="'.$fieldname.'_related"'.
- ($relatedvalue?' checked="checked"':'').' />';
+ ($relatedvalue?' checked="checked"':'').' id="'.$fieldname.'_related" />';
}
sub prettyinput {
@@ -657,7 +660,7 @@
}
if (($type eq 'lowestgradelevel') ||
($type eq 'highestgradelevel')) {
- return &Apache::loncommon::select_level_form($value,$fieldname).
+ return &Apache::loncommon::select_level_form($value,$fieldname,$fieldname).
&relatedfield(0,$relatedsearchflag,$relatedsep);
}
return();
@@ -665,7 +668,7 @@
# Language
if ($type eq 'language') {
return &selectbox($fieldname,
- $value,'',
+ $value,'',$fieldname,
\&Apache::loncommon::languagedescription,
(&Apache::loncommon::languageids)).
&relatedfield(0,$relatedsearchflag,$relatedsep);
@@ -673,7 +676,7 @@
# Copyright
if ($type eq 'copyright') {
return &selectbox($fieldname,
- $value,$readonly,
+ $value,$readonly,$fieldname,
\&Apache::loncommon::copyrightdescription,
(&Apache::loncommon::copyrightids)).
&relatedfield(0,$relatedsearchflag,$relatedsep);
@@ -681,7 +684,7 @@
# Source Copyright
if ($type eq 'sourceavail') {
return &selectbox($fieldname,
- $value,'',
+ $value,'',$fieldname,
\&Apache::loncommon::source_copyrightdescription,
(&Apache::loncommon::source_copyrightids)).
&relatedfield(0,$relatedsearchflag,$relatedsep);
@@ -689,22 +692,22 @@
# Gradelevels
if (($type eq 'lowestgradelevel') ||
($type eq 'highestgradelevel')) {
- return &Apache::loncommon::select_level_form($value,$fieldname).
+ return &Apache::loncommon::select_level_form($value,$fieldname,$fieldname).
&relatedfield(0,$relatedsearchflag,$relatedsep);
}
# Obsolete
if ($type eq 'obsolete') {
return '<input type="checkbox" name="'.$fieldname.'"'.
- ($value?' checked="checked"':'').' />'.
+ ($value?' checked="checked"':'').' id="'.$fieldname.'" />'.
&relatedfield(0,$relatedsearchflag,$relatedsep);
}
# Obsolete replacement file
if ($type eq 'obsoletereplacement') {
return '<input type="text" name="'.$fieldname.
- '" size="60" value="'.$value.'" /><a href="javascript:openbrowser'.
+ '" size="60" value="'.$value.'" id="'.$fieldname.'" /><a href="javascript:openbrowser'.
"('".$formname."','".$fieldname."'".
",'')\">".&mt('Select').'</a>'.
- &relatedfield(0,$relatedsearchflag,$relatedsep);
+ &relatedfield(0,$relatedsearchflag,$relatedsep);
}
# Customdistribution file
if ($type eq 'customdistributionfile') {
@@ -714,7 +717,7 @@
}
my $output;
$output = '<input type="text" name="'.$fieldname.
- '" size="60" value="'.$value.'"'.$disabled.' />';
+ '" size="60" value="'.$value.'"'.$disabled.' id="'.$fieldname.'" />';
unless ($readonly) {
$output .= '<a href="javascript:openbrowser'.
"('".$formname."','".$fieldname."'".
@@ -726,7 +729,7 @@
# Source Customdistribution file
if ($type eq 'sourcerights') {
return '<input type="text" name="'.$fieldname.
- '" size="60" value="'.$value.'" /><a href="javascript:openbrowser'.
+ '" size="60" value="'.$value.'" id="'.$fieldname.'" /><a href="javascript:openbrowser'.
"('".$formname."','".$fieldname."'".
",'rights')\">".&mt('Select').'</a>'.
&relatedfield(0,$relatedsearchflag,$relatedsep);
@@ -750,9 +753,9 @@
$value=~s/\"/\"\;/gs;
return
'<input type="text" name="'.$fieldname.'" size="'.$size.'" '.
- 'value="'.$value.'" />'.
+ 'value="'.$value.'" id="'.$fieldname.'" />'.
&relatedfield(1,$relatedsearchflag,$relatedsep,$fieldname,
- $relatedvalue);
+ $relatedvalue);
}
# Create pageheader
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.360 loncom/interface/lonsearchcat.pm:1.361
--- loncom/interface/lonsearchcat.pm:1.360 Sat Dec 30 03:52:33 2023
+++ loncom/interface/lonsearchcat.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.360 2023/12/30 03:52:33 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.361 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -399,7 +399,7 @@
}
}
return OK;
-}
+}
#
# The mechanism used to store values away and retrieve them does not
@@ -547,7 +547,7 @@
&Apache::lonhtmlcommon::textbox('basicexp',
$env{'form.basicexp'},50).
'<br />'.
- '<span class="LC_fontsize_small">'.&searchhelp().'</span>'.'</td>'.
+ '<span class="LC_fontsize_medium">'.&searchhelp().'</span>'.'</td>'.
'<td>'.
'<span class="LC_nobreak">'.(' 'x3).$adv_search_link.'</span>'.'<br />'.
'<span class="LC_nobreak">'.(' 'x1).$userelatedwords.'</span>'.'<br />'.
@@ -617,7 +617,7 @@
}
my $scrout= &Apache::loncommon::start_page("Advanced $srchtype Search",
$jscript);
- $scrout .= $bread_crumb;
+ $scrout .= $bread_crumb.'<div class="LC_landmark" role="main">'."\n";
$scrout .= '<form method="post" action="/adm/searchcat" name="advsearch">'
.$hidden_fields
@@ -636,7 +636,7 @@
# Standard Metadata
$scrout .= &Apache::lonhtmlcommon::row_headline()
- .'<h3>'.&mt("Standard $srchtype Metadata").'</h3>'
+ .'<h2 class="LC_heading_2">'.&mt("Standard $srchtype Metadata").'</h2>'
.&searchhelp()
.&Apache::lonhtmlcommon::row_closure();
my %related_word_search =
@@ -656,24 +656,26 @@
foreach my $field ('title','author','subject','owner','authorspace',
'modifyinguser','keywords','notes','abstract',
'standards','mime') {
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield($fields{$field}))
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="'.$field.'">'.
+ &titlefield($fields{$field}).'</label>')
.&Apache::lonmeta::prettyinput($field,
$env{'form.'.$field},'',
$field,
'advsearch',
$related_word_search{$field},
- '',
+ ' ',
$env{'form.'.$field.'_related'},
50);
if ($related_word_search{$field}) {
- $scrout .= &mt('related words');
+ $scrout .= '<label for="'.$field.'_related">'.&mt('related words').'</label>';
} else {
$scrout .= '';
}
$scrout .= &Apache::lonhtmlcommon::row_closure();
}
foreach my $field ('lowestgradelevel','highestgradelevel') {
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield($fields{$field}))
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="'.$field.'">'.
+ &titlefield($fields{$field}).'</label>')
.&Apache::lonmeta::prettyinput($field,
$env{'form.'.$field},'',
$field,
@@ -682,9 +684,10 @@
.&Apache::lonhtmlcommon::row_closure();
}
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('MIME Type Category')))
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="category">'.
+ &titlefield(&mt('MIME Type Category')).'</label>')
.&Apache::loncommon::filecategoryselect('category',
- $env{'form.category'})
+ $env{'form.category'},'category')
.&Apache::lonhtmlcommon::row_closure();
my $anydomain = 1;
@@ -694,23 +697,27 @@
}
}
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('Domains')));
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="domains">'.
+ &titlefield(&mt('Domains')).'</label>');
if ($anydomain) {
my $defdom = &Apache::lonnet::default_login_domain();
my ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('shared',$defdom);
$scrout .= &Apache::loncommon::domain_select('domains',
- $env{'form.domains'},1,$trusted,$untrusted);
+ $env{'form.domains'},1,$trusted,$untrusted,'domains');
} else {
$scrout .= &Apache::loncommon::select_dom_form($env{'user.domain'},
- 'domains','','','',[$env{'user.domain'}],'',1);
+ 'domains','','','',
+ [$env{'user.domain'}],'',1,'domains');
}
$scrout .= &Apache::lonhtmlcommon::row_closure();
# Misc metadata
if ($env{'form.area'} ne 'portfolio') {
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('Copyright/Distribution')))
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="copyright">'.
+ &titlefield(&mt('Copyright/Distribution')).'</label>')
.&Apache::lonmeta::selectbox('copyright',
$env{'form.copyright'},'',
+ 'copyright',
\&Apache::loncommon::copyrightdescription,
( undef,
&Apache::loncommon::copyrightids)
@@ -718,9 +725,10 @@
.&Apache::lonhtmlcommon::row_closure();
}
- $scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt('Language')))
+ $scrout .= &Apache::lonhtmlcommon::row_title('<label for="language">'.
+ &titlefield(&mt('Language'))'</label>')
.&Apache::lonmeta::selectbox('language',
- $env{'form.language'},'',
+ $env{'form.language'},'','language',
\&Apache::loncommon::languagedescription,
('any',&Apache::loncommon::languageids)
)
@@ -733,26 +741,32 @@
if ($curnumadd eq '') {
$curnumadd = 1;
}
+ my $customlabel = &mt('Text box description');
$scrout .= &Apache::lonhtmlcommon::row_headline()
.'<h3>'.&mt('Custom Metadata fields').'</h3>'
.&Apache::lonhtmlcommon::row_closure()
- .&Apache::lonhtmlcommon::row_title('')
+ .&Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$customlabel.'</span>',
+ '','','',1)
.&mt('Field Name').' | '.&mt('Field Value(s)')
.&Apache::lonhtmlcommon::row_closure();
for (my $j=0; $j<$curnumadd; $j++) {
my $num = $j+1;
+ my $namelabel = &mt('name of custom metadata field [_1]',$num);
+ my $valuelabel = &mt('value of custom metadata field [_1]',$num);
$scrout .= &Apache::lonhtmlcommon::row_title(&mt('Custom metadata [_1]',$num))
- .'<input type="text"'
+ .'<input type="text" id="addedfield_'.$j.'"'
.' name="addedfield_'.$j.'" size="10"'
- .' value="'.$env{'form.addedfield_'.$j}.'" />'
+ .' value="'.$env{'form.addedfield_'.$j}.'" aria-label="'.$namelabel.'" />'
.' '
.'<input type="text" '
.'name="addedvalues_'.$j.'" size="15"'
- .' value="'.$env{'form.addedvalues_'.$j}.'" />'
+ .' value="'.$env{'form.addedvalues_'.$j}.'" aria-label="'.$valuelabel.'" />'
.&Apache::lonhtmlcommon::row_closure();
}
- $scrout .= &Apache::lonhtmlcommon::row_title('')
+ my $addcustomlabel = &mt('Add metadata field option');
+ $scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$addcustomlabel.'</span>',
+ '','','',1)
.'<label>'
.'<input type="checkbox" name="newfield"'
.' value="1" onclick="javascript:additional_metadata()" />'
@@ -763,65 +777,90 @@
} else {
#
# Dynamic metadata
+ my $statslabel = &mt('Text box description');
$scrout .= &Apache::lonhtmlcommon::row_headline()
.'<h3>'.&mt('Problem Statistics').'</h3>'
.&Apache::lonhtmlcommon::row_closure();
- $scrout .= &Apache::lonhtmlcommon::row_title('')
+ $scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$statslabel.'</span>',
+ '','','',1)
.&mt('Minimum').' | '.&mt('Maximum')
.&Apache::lonhtmlcommon::row_closure();
foreach my $statistic
({ name=>'count',
- description=>'Network-wide number of accesses (hits)',},
+ description=>'Network-wide number of accesses (hits)',
+ minlabel => 'minimum hit count',
+ maxlabel => 'maximum hit count'},
{ name=>'stdno',
description=>
- 'Statistics calculated for number of students',},
+ 'Statistics calculated for number of students',
+ minlabel => 'minimum number of students in calculation',
+ maxlabel => 'maximum number of students in calculation'},
{ name => 'avetries',
- description=>'Average number of tries till solved',},
+ description=>'Average number of tries till solved',
+ minlabel => 'minimum average tries till solved',
+ maxlabel => 'maximum average tries till solved'},
{ name => 'difficulty',
- description=>'Degree of difficulty',},
+ description=>'Degree of difficulty',
+ minlabel => 'minimum degree of difficulty',
+ maxlabel => 'maximum degree of difficulty'},
{ name => 'disc',
- description=>'Degree of discrimination'}) {
+ description=>'Degree of discrimination',
+ minlabel => 'minimum degree of discrimination',
+ maxlabel => 'maximum degree of discrimination'}) {
$scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt($statistic->{'description'})))
.'<input type="text" name="'.$statistic->{'name'}
- .'_min" value="" size="6" />'
+ .'_min" value="" size="6" aria-label="'.&mt($statistic->{'minlabel'}).'" />'
.' '
.'<input type="text" name="'.$statistic->{'name'}
- .'_max" value="" size="6" />'
+ .'_max" value="" size="6" aria-label="'.&mt($statistic->{'maxlabel'}).'" />'
.&Apache::lonhtmlcommon::row_closure();
}
-
+ my $evallabel = &mt('Text box description');
$scrout .= &Apache::lonhtmlcommon::row_headline()
.'<h3>'.&mt('Evaluation Data').'</h3>'
.&Apache::lonhtmlcommon::row_closure();
- $scrout .= &Apache::lonhtmlcommon::row_title('')
+ $scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$evallabel.'</span>',
+ '','','',1)
.&mt('Minimum').' | '.&mt('Maximum')
.&Apache::lonhtmlcommon::row_closure();
foreach my $evaluation
( { name => 'clear',
- description => 'Material presented in clear way'},
+ description => 'Material presented in clear way',
+ minlabel => 'minimum score: clarity',
+ maxlabel => 'maximum score: clarity'},
{ name =>'depth',
- description => 'Material covered with sufficient depth'},
+ description => 'Material covered with sufficient depth',
+ minlabel => 'minimum score: coverage depth',
+ maxlabel => 'maximum score: coverage depth'},
{ name => 'helpful',
- description => 'Material is helpful'},
+ description => 'Material is helpful',
+ minlabel => 'minimum score: content helpful',
+ maxlabel => 'maximum score: content helpful'},
{ name => 'correct',
- description => 'Material appears to be correct'},
+ description => 'Material appears to be correct',
+ minlabel => 'minimum score: correctness',
+ maxlabel => 'maximum score: correctness'},
{ name => 'technical',
- description => 'Resource is technically correct'}){
+ description => 'Resource is technically correct',
+ minlabel => 'minimum score: technical correctness',
+ maxlabel => 'maximum score: technical correctness'}) {
$scrout .= &Apache::lonhtmlcommon::row_title(&titlefield(&mt($evaluation->{'description'})))
.'<input type="text" name="'
- .$evaluation->{'name'}.'_min" value="" size="6" />'
+ .$evaluation->{'name'}.'_min" value="" size="6" aria-label="'.&mt($evaluation->{'minlabel'}).'" />'
.' '
.'<input type="text" name="'
- .$evaluation->{'name'}.'_max" value="" size="6" />'
+ .$evaluation->{'name'}.'_max" value="" size="6" aria-label="'.&mt($evaluation->{'maxlabel'}).'" />'
.&Apache::lonhtmlcommon::row_closure();
}
}
#
# Creation/Modification date limits
+ my $dateslabel = &mt('Text box description');
$scrout .= &Apache::lonhtmlcommon::row_headline()
.'<h3>'.&mt('Creation and Modification dates').'</h3>'
.&Apache::lonhtmlcommon::row_closure();
- $scrout .= &Apache::lonhtmlcommon::row_title('')
+ $scrout .= &Apache::lonhtmlcommon::row_title('<span class="LC_visually_hidden">'.$dateslabel.'</span>',
+ '','','',1)
.&mt('Month[_1]Day[_2]Year',' 'x14,' 'x6)
.&Apache::lonhtmlcommon::row_closure();
@@ -880,7 +919,7 @@
$scrout .= $advanced_buttons
.'</form>';
- $scrout .= &Apache::loncommon::end_page();
+ $scrout .= '</div>'.&Apache::loncommon::end_page();
$r->print($scrout);
return;
}
@@ -953,20 +992,20 @@
if (! defined($env{'form.viewselect'})) {
$env{'form.viewselect'}='detailed';
}
- $scrout .= '<span class="LC_nobreak">'
+ $scrout .= '<span class="LC_nobreak"><label>'
.&mt('Type:').' '
.&Apache::lonmeta::selectbox('viewselect',
- $env{'form.viewselect'},'',
+ $env{'form.viewselect'},'','',
\&viewoptiontext,
sort(keys(%Views)))
- .'</span>';
+ .'</label></span>';
my $countselect = &Apache::lonmeta::selectbox('show',
- $env{'form.show'},'',
+ $env{'form.show'},'','',
undef,
(10,20,50,100,1000,10000));
- $scrout .= ' <span class="LC_nobreak">'
+ $scrout .= ' <span class="LC_nobreak"><label>'
.&mt('Records per Page:').' '.$countselect
- .'</span>'.$/;
+ .'</label></span>'.$/;
return $scrout;
}
Index: loncom/interface/slotrequest.pm
diff -u loncom/interface/slotrequest.pm:1.147 loncom/interface/slotrequest.pm:1.148
--- loncom/interface/slotrequest.pm:1.147 Wed Jul 12 15:48:23 2023
+++ loncom/interface/slotrequest.pm Tue Mar 18 18:57:28 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.147 2023/07/12 15:48:23 raeburn Exp $
+# $Id: slotrequest.pm,v 1.148 2025/03/18 18:57:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2916,7 +2916,7 @@
my (%titles,%maptitles);
my $output = '<br /><table><tr><td valign="top">'.
'<span class="LC_nobreak"><b>'.&mt('Changes/page:').'</b><br />'.
- &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef,
+ &Apache::lonmeta::selectbox('show',$curr->{'show'},'','',undef,
(&mt('all'),5,10,20,50,100,1000,10000)).
'</td><td> </td>';
my $startform =
More information about the LON-CAPA-cvs
mailing list