View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 03586 | Bug reports | Survey taking | public | 2009-08-18 22:03 | 2009-08-31 15:12 |
| Reporter | Assigned To | c_schmitz | |||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.85+ | ||||
| Fixed in Version | 1.85+ | ||||
| Summary | 03586: Patch for improved accessibility (alt tags on text input boxes) | ||||
| Description | Modified qanda.php to add alt labels to text box elements for improved Section 508 compliance. | ||||
| Tags | No tags attached. | ||||
| Attached Files | section508.diff (8,261 bytes)
*** qanda.php 2009-08-18 14:07:39.000000000 -0500
--- qanda.php.orig 2009-08-18 12:38:54.000000000 -0500
***************
*** 1085,1091 ****
}
}
! $answer .= '<input class="text" type="text" size="10" name="'.$ia[1].'" style="display: none" id="answer'.$ia[1].'" value="'.$_SESSION[$ia[1]].'" maxlength="10" alt="answer" onchange="checkconditions(this.value, this.name, this.type)" />
</p>';
$answer .= '<input type="hidden" name="qattribute_answer[]" value="'.$ia[1].'" />
<input type="hidden" id="qattribute_answer'.$ia[1].'" name="qattribute_answer'.$ia[1].'" />
--- 1085,1091 ----
}
}
! $answer .= '<input class="text" type="text" size="10" name="'.$ia[1].'" style="display: none" id="answer'.$ia[1].'" value="'.$_SESSION[$ia[1]].'" maxlength="10" onchange="checkconditions(this.value, this.name, this.type)" />
</p>';
$answer .= '<input type="hidden" name="qattribute_answer[]" value="'.$ia[1].'" />
<input type="hidden" id="qattribute_answer'.$ia[1].'" name="qattribute_answer'.$ia[1].'" />
***************
*** 1110,1116 ****
}
$answer ="<p class=\"question\">
! <input class='popupdate' type=\"text\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" alt=\"Date Picker\" onkeypress=\"return goodchars(event,'0123456789-')\" onchange=\"checkconditions(this.value, this.name, this.type)\" />
<input type='hidden' name='dateformat{$ia[1]}' id='dateformat{$ia[1]}' value='{$dateformatdetails['jsdate']}' />
<input type='hidden' name='datelanguage{$ia[1]}' id='datelanguage{$ia[1]}' value='{$clang->langcode}' />
</p>
--- 1110,1116 ----
}
$answer ="<p class=\"question\">
! <input class='popupdate' type=\"text\" size=\"10\" name=\"{$ia[1]}\" id=\"answer{$ia[1]}\" value=\"$dateoutput\" maxlength=\"10\" onkeypress=\"return goodchars(event,'0123456789-')\" onchange=\"checkconditions(this.value, this.name, this.type)\" />
<input type='hidden' name='dateformat{$ia[1]}' id='dateformat{$ia[1]}' value='{$dateformatdetails['jsdate']}' />
<input type='hidden' name='datelanguage{$ia[1]}' id='datelanguage{$ia[1]}' value='{$clang->langcode}' />
</p>
***************
*** 1379,1385 ****
// // --> END BUG FIX
// --> START NEW FEATURE - SAVE
! $answer .= " alt=\"other answer\" onchange='checkconditions(this.value, this.name, this.type);'";
$thisfieldname="$ia[1]other";
if (isset($_SESSION[$thisfieldname])) { $answer .= " value='".htmlspecialchars($_SESSION[$thisfieldname],ENT_QUOTES)."' ";}
$answer .= ' />';
--- 1379,1385 ----
// // --> END BUG FIX
// --> START NEW FEATURE - SAVE
! $answer .= " onchange='checkconditions(this.value, this.name, this.type);'";
$thisfieldname="$ia[1]other";
if (isset($_SESSION[$thisfieldname])) { $answer .= " value='".htmlspecialchars($_SESSION[$thisfieldname],ENT_QUOTES)."' ";}
$answer .= ' />';
***************
*** 1523,1529 ****
';
}
! $answer .= ' <input type="hidden" name="java'.$ia[1].'" id="java'.$ia[1]."\" value=\"{$_SESSION[$ia[1]]}\" alt=\"other text\" />\n";
if (isset($other) && $other=="Y")
{
--- 1523,1529 ----
';
}
! $answer .= ' <input type="hidden" name="java'.$ia[1].'" id="java'.$ia[1]."\" value=\"{$_SESSION[$ia[1]]}\" />\n";
if (isset($other) && $other=="Y")
{
***************
*** 1558,1564 ****
."\t}\n"
."//--></script>\n".$answer;
! $answer .= ' <input type="text" id="othertext'.$ia[1].'" name="'.$ia[1].'other" alt="other text" style="display:';
if ($_SESSION[$ia[1]] != '-oth-')
{
$answer .= ' none';
--- 1558,1564 ----
."\t}\n"
."//--></script>\n".$answer;
! $answer .= ' <input type="text" id="othertext'.$ia[1].'" name="'.$ia[1].'other" style="display:';
if ($_SESSION[$ia[1]] != '-oth-')
{
$answer .= ' none';
***************
*** 2698,2704 ****
}
$answer .= $wrapper['item-start'].'
! <input class="checkbox" type="checkbox" name="'.$myfname.'cbox" id="answer'.$myfname.'cbox" alt="Other"';
if (isset($_SESSION[$myfname]) && trim($_SESSION[$myfname])!='')
{
--- 2698,2704 ----
}
$answer .= $wrapper['item-start'].'
! <input class="checkbox" type="checkbox" name="'.$myfname.'cbox" id="answer'.$myfname.'cbox"';
if (isset($_SESSION[$myfname]) && trim($_SESSION[$myfname])!='')
{
***************
*** 3705,3711 ****
}
// --> START NEW FEATURE - SAVE
$answer = "<p class=\"question\">\n\t$prefix\n\t<input class=\"text\" type=\"text\" size=\"$tiwidth\" name=\"$ia[1]\" "
! . "id=\"answer{$ia[1]}\" value=\"{$_SESSION[$ia[1]]}\" alt=\"answer\" onkeypress=\"return goodchars(event,'0123456789.')\" onchange='checkconditions(this.value, this.name, this.type)'"
. "maxlength=\"$maxsize\" />\n\t$suffix\n</p>\n"
. "<p class=\"tip\">".$clang->gT('Only numbers may be entered in this field')."</p>\n";
// --> END NEW FEATURE - SAVE
--- 3705,3711 ----
}
// --> START NEW FEATURE - SAVE
$answer = "<p class=\"question\">\n\t$prefix\n\t<input class=\"text\" type=\"text\" size=\"$tiwidth\" name=\"$ia[1]\" "
! . "id=\"answer{$ia[1]}\" value=\"{$_SESSION[$ia[1]]}\" onkeypress=\"return goodchars(event,'0123456789.')\" onchange='checkconditions(this.value, this.name, this.type)'"
. "maxlength=\"$maxsize\" />\n\t$suffix\n</p>\n"
. "<p class=\"tip\">".$clang->gT('Only numbers may be entered in this field')."</p>\n";
// --> END NEW FEATURE - SAVE
***************
*** 3757,3763 ****
// --> START NEW FEATURE - SAVE
$answer = "<p class=\"question\">\n\t$prefix\n\t<input class=\"text\" type=\"text\" size=\"$tiwidth\" name=\"$ia[1]\" id=\"answer$ia[1]\" value=\""
.str_replace ("\"", "'", str_replace("\\", "", $_SESSION[$ia[1]]))
! ."\" maxlength=\"$maxsize\" alt=\"answer\" onkeyup=\"checkconditions(this.value, this.name, this.type)\" />\n\t$suffix\n</p>\n";
// --> END NEW FEATURE - SAVE
$inputnames[]=$ia[1];
--- 3757,3763 ----
// --> START NEW FEATURE - SAVE
$answer = "<p class=\"question\">\n\t$prefix\n\t<input class=\"text\" type=\"text\" size=\"$tiwidth\" name=\"$ia[1]\" id=\"answer$ia[1]\" value=\""
.str_replace ("\"", "'", str_replace("\\", "", $_SESSION[$ia[1]]))
! ."\" maxlength=\"$maxsize\" onkeyup=\"checkconditions(this.value, this.name, this.type)\" />\n\t$suffix\n</p>\n";
// --> END NEW FEATURE - SAVE
$inputnames[]=$ia[1];
***************
*** 3816,3822 ****
// --> START ENHANCEMENT - TEXT INPUT WIDTH
// --> START NEW FEATURE - SAVE
! $answer .= '<textarea class="textarea" name="'.$ia[1].'" id="answer'.$ia[1].'" alt="answer" '
.'rows="'.$drows.'" cols="'.$tiwidth.'" onkeyup="textLimit(\'answer'.$ia[1].'\', '.$maxsize.'); checkconditions(this.value, this.name, this.type)">';
// --> END NEW FEATURE - SAVE
--- 3816,3822 ----
// --> START ENHANCEMENT - TEXT INPUT WIDTH
// --> START NEW FEATURE - SAVE
! $answer .= '<textarea class="textarea" name="'.$ia[1].'" id="answer'.$ia[1].'" '
.'rows="'.$drows.'" cols="'.$tiwidth.'" onkeyup="textLimit(\'answer'.$ia[1].'\', '.$maxsize.'); checkconditions(this.value, this.name, this.type)">';
// --> END NEW FEATURE - SAVE
***************
*** 3881,3887 ****
// --> START ENHANCEMENT - TEXT INPUT WIDTH
// --> START NEW FEATURE - SAVE
! $answer .= '<textarea class="display" name="'.$ia[1].'" id="answer'.$ia[1].'" alt="answer" '
.'rows="'.$drows.'" cols="'.$tiwidth.'" onkeyup="textLimit(\'answer'.$ia[1].'\', '.$maxsize.'); checkconditions(this.value, this.name, this.type)">';
// --> END NEW FEATURE - SAVE
--- 3881,3887 ----
// --> START ENHANCEMENT - TEXT INPUT WIDTH
// --> START NEW FEATURE - SAVE
! $answer .= '<textarea class="display" name="'.$ia[1].'" id="answer'.$ia[1].'" '
.'rows="'.$drows.'" cols="'.$tiwidth.'" onkeyup="textLimit(\'answer'.$ia[1].'\', '.$maxsize.'); checkconditions(this.value, this.name, this.type)">';
// --> END NEW FEATURE - SAVE
| ||||
| Bug heat | 4 | ||||
| Complete LimeSurvey version number (& build) | 7191 | ||||
| I will donate to the project if issue is resolved | |||||
| Browser | |||||
| Database type & version | |||||
| Server OS (if known) | |||||
| Webserver software & version (if known) | |||||
| PHP Version | |||||
|
@ c_schmitz: please verify the attached patch |
|
|
johnichiban, can you attached the modified file please? I am having problems with the patch. |
|
|
Pretty please? |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-08-18 22:03 |
|
New Issue | |
| 2009-08-18 22:03 |
|
Status | new => assigned |
| 2009-08-18 22:03 |
|
Assigned To | => user372 |
| 2009-08-18 22:03 |
|
File Added: section508.diff | |
| 2009-08-18 22:03 |
|
Build Number | => 7191 |
| 2009-08-18 22:05 |
|
Assigned To | user372 => c_schmitz |
| 2009-08-18 22:06 |
|
Note Added: 09161 | |
| 2009-08-19 15:02 | c_schmitz | Note Added: 09178 | |
| 2009-08-19 15:02 | c_schmitz | Note Edited: 09178 | |
| 2009-08-19 15:03 | c_schmitz | Status | assigned => feedback |
| 2009-08-24 00:40 | c_schmitz | Note Added: 09197 | |
| 2009-08-27 12:28 | c_schmitz | Status | feedback => resolved |
| 2009-08-27 12:28 | c_schmitz | Fixed in Version | => 1.85+ |
| 2009-08-27 12:28 | c_schmitz | Resolution | open => fixed |
| 2009-08-31 15:12 | c_schmitz | Status | resolved => closed |
| 2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |