Hi,
I think this 2 bug MUST be fixed in core . But want the best for this

For
checkbox / other : actually : we show it in javascript ...
without js:
Code:
<input class="checkbox other-checkbox dontread" style="visibility:hidden" name="841587X1918X41648othercbox" id="answer841587X1918X41648othercbox" type="checkbox">
<label for="answer841587X1918X41648other" class="answertext">Other:</label>
<input class="text " name="841587X1918X41648other" id="answer841587X1918X41648other" value="" type="text">
i update display:none to visibility:hidden .... just for 'better look' , bad idea here ....
JS do :
Code:
$('#answer841587X1918X41648othercbox').prop('aria-hidden', 'true').css('visibility','');$('#answer841587X1918X41648other').bind('keyup focusout',function(event){
if ($.trim($(this).val()).length>0) { $("#answer841587X1918X41648othercbox").prop("checked",true); } else { $("#answer841587X1918X41648othercbox").prop("checked",false); }; $("#java841587X1918X41648other").val($(this).val());LEMflagMandOther("841587X1918X41648other",$('#answer841587X1918X41648othercbox').is(":checked")); checkconditions(this.value, this.name, this.type);
})
BUT we are in HTML4, then aria-hidden don't work (and must be put in HTML).
The checkbox/other is used only in JS : we don't need it : it not used by PHP. Only answer841587X1918X41648other is used . Best is to remove it directly (first patch remove it, adding it in JS only).
This must be fixed in core .
For
radio/other
Yes, actually : we have strange labelling here .
What is your advice for best accessibility ?
Code:
<input type="radio" value="-oth-" id="answer841587X1917X41646-oth-" /><label for="answer841587X1917X41646">Other (actual other),</label>
<label for="answer841587X1917X41646othertext" class="hide">Please give detail</label><input type="text" id="answer841587X1917X41646othertext" value="" />
I look at your code. For best update of answer part, actully : i used DOMDocument() and not regexp. regexp is more unsecure i think (for LS update).
But still : i have to make a clean PULL request for core system with "question labelling" , really fix core . Maybe for LS3 ?
Denis
PS: if you have a github account : i make a repo on github