Check out the LimeSurvey source code on GitHub!

How to disable question table summary?

More
5 years 8 months ago #61329 by lhughes30
By default, the question text from the td.questiontext element is repeated in the summary attribute of the table.question element. When using a screen reader like JAWS, this causes the question to be read twice, which is very confusing to blind users. Is there any way to disable the summary, or does anyone have other ideas on how to eliminate the duplication?

Thanks for any help.

Lee

Please Log in to join the conversation.

More
5 years 8 months ago #61368 by tpartner
This is not tested with a screen reader but try adding the following to the end of template.js. It will remove the summary after page load.
	$(document).ready(function() {
 
		$('table.question').attr('summary', '');
 
	});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 8 months ago #61371 by holch
As most of the screen readers ignore Javascript (as far as I know), this won't be a solution, Tony. ;-)

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 8 months ago #61373 by tpartner
But if they ignore JavaScript the survey won't work. It is largely driven by jQuery and JavaScript.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 8 months ago #61374 by holch
As far as I know, the surveys themselve are supposed to be "accessible" or "barrier free" (not so the administration).

A Limesurvey with the default template should work without Javascript as well. conditions on a one-page survey might not work, but in general it should. At least this was what I have heard so far. Maybe that has changed lately.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 8 months ago #61430 by lhughes30
I put this in template.js of the template my survey is linked to, just below the comments to enable focusFirst. It has no effect. I tried it in a fresh browser session with a different browser just to make sure caching wasn't causing problems -- no help. I double-checked and the code snippet definitely is not commented out so it should be active. I added "alert('HERE')" inside the snippet and the popup displays as expected. Any ideas?

Thanks very much for your response and help.

Lee

Please Log in to join the conversation.

More
5 years 8 months ago #61431 by tpartner
Lee, are you testing with a screen reader or a normal browser? Holch thinks that screen readers will ignore the JS but then the alert shouldn't work either.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 8 months ago #61432 by lhughes30
Tony- I'm just testing with Firefox and Chrome for now, checking the page source to verify that the summary attribute has been blanked out.

The screen reader (JAWS) "speaks" the page based on the underlying generated HTML, so as long as the JavaScript removes the summary attribute from the rendered page, I think it should work.

Please Log in to join the conversation.

More
5 years 8 months ago #61433 by tpartner
Hang on, I'll activate a sample survey for you...

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 8 months ago #61434 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 8 months ago #61435 by lhughes30
Tony-

That's an interesting idea -- it looks like you removed the description from the displayed question text while keeping it in the table summary element. That would certainly prevent screen readers from repeating the question twice. I should have pointed out, though, that these surveys will be taken by non-handicapped people as well, so the displayed question text will be important.

Thanks for your efforts, I feel we're getting close to a solution.

Lee

Please Log in to join the conversation.

More
5 years 8 months ago #61436 by tpartner
No, I just removed it from the summary:


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:

Please Log in to join the conversation.

More
5 years 8 months ago #61437 by lhughes30
Weird, in my browser (stock Firefox 4.0.1 with JavaScript enabled) the summary is still there. See attached screenshot.
Screenshot-Source of: http:--www.partnersinc.biz-surveys--index.php - Mozilla Firefox.png

Please Log in to join the conversation.

More
5 years 8 months ago #61438 by lhughes30
Trying that attachment again...
screenshot3.png

Please Log in to join the conversation.

More
5 years 8 months ago #61439 by lhughes30
OK I'll just cut and paste:
<!-- PRESENT THE QUESTIONS -->

<div id="question3887" class="array-flexible-row">
<table class="question-wrapper">
<tr>
<td class="questiontext">
<span class="asterisk"></span>Q1<br /><br /><span class="questionhelp"></span>


</td>
</tr>
<tr>
<td class="answer">


<table class="question" summary="Q1 - an array type question" >
<colgroup class="col-responses">
<col class="col-answers" width="20%" />
<col class="odd" width="16%" />

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form