Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

<h3> instead of <div class="h3">

More
5 years 3 months ago - 5 years 3 months ago #178078 by Witz
<h3> instead of <div class="h3"> was created by Witz
Base on the Accessibility rule at here , The page should have headings but Limesurvey themes are using div tag with a class.

I am using the latest verion, 3.15.5+181115

I am looking for a way to reaplce <div classs="h3"> to <h3> especially on the front page where a Limesurvey asks a token to start a survey. (The page screenshot was added as attachment.).
Attachments:
Last edit: 5 years 3 months ago by Witz.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178116 by holch
Replied by holch on topic <h3> instead of <div class="h3">
I agree that always the correct HTML tags should be used. But then, especially on this specific piece of code the change from the div to the H3 does add very little to accessibility, because the information that "To participate..." is a H3 adds very little, because it is actually not really a header, is it. It is just a piece of information. So I would not kill myself over that.

Not sure if this can be found in the template files.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 3 months ago - 5 years 3 months ago #178118 by LouisGac
Replied by LouisGac on topic <h3> instead of <div class="h3">
it's been a hard debate, you can't imagine.
The main point, the technical one that closed that debate, is that LS user can insert inside a title other HTML tags, like div.

This is not correct:
Code:
<h3><div>blablabla></div></h3>


This is correct
Code:
<div class="h3"><div>blablabla></div></div>

So we prefer to give max freedom to end user, so he can add any HTML tag in the title from the HTML WYSIWG editor.
Last edit: 5 years 3 months ago by LouisGac.
The topic has been locked.
More
5 years 3 months ago #178120 by Witz
Replied by Witz on topic <h3> instead of <div class="h3">
I am fine with adding an extra title on this page. It would be very helpful if you can let me know where I can edit this page
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 3 months ago #178121 by LouisGac
Replied by LouisGac on topic <h3> instead of <div class="h3">

Witz wrote: I am fine with adding an extra title on this page. It would be very helpful if you can let me know where I can edit this page


On the home page, click on "Themes", then extend the theme you want to modify.
In the Theme editor, edit this twig file:

github.com/LimeSurvey/LimeSurvey/blob/ma...urvey_list.twig#L134
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago - 5 years 3 months ago #178124 by tpartner
Replied by tpartner on topic <h3> instead of <div class="h3">
That can be modified in upload/themes/survey/yourThemeName/views/subviews/logincomponents/captcha.twig.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 3 months ago by tpartner.
The following user(s) said Thank You: Witz
The topic has been locked.
More
5 years 3 months ago #178126 by Witz
Replied by Witz on topic <h3> instead of <div class="h3">
captcha.twig is under the vanila theme but not under the my theme.

How can I make a local copy?
The topic has been locked.
More
5 years 3 months ago #178127 by Witz
Replied by Witz on topic <h3> instead of <div class="h3">
Thank you for the quick reply but the location you indicated was for the survey list, not the token page where a user type in the token for starting a survey.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 3 months ago #178128 by LouisGac
Replied by LouisGac on topic <h3> instead of <div class="h3">
yes sorry, I think tpartner is correct.
The topic has been locked.
More
5 years 3 months ago #178129 by Witz
Replied by Witz on topic <h3> instead of <div class="h3">
Not exactly but I could find a correct file in the same directory. Just for the future reference I am leaving a exact file name.

upload/themes/survey/yourThemeName/views/subviews/logincomponents/token.twig
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178157 by DenisChenu
Replied by DenisChenu on topic <h3> instead of <div class="h3">
For a11y dedicated part in theme, i use an option for question text too (hadding header/h3 (or h2))
gitlab.com/SondagesPro/SurveyThemes/skel...aster/config.xml#L57

But unsure about token part …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: LouisGac
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose