View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
05846Bug reportsSurvey takingpublic2012-03-14 21:08
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92RC4 
Target Version1.92Fixed in Version1.92 
Summary05846: Label on question texte can be a bad solution
Description

We put some label for the question text.

But it can be a proble:
label is an inline element, then we can't put block element inside it.

There are sur other problem. ( link for example ...)

Steps To Reproduce

Add some link , div presentation on a question type text.

Additional Information

There are a exemple here:
ls-dev.sondages.pro/upload/preview-question.html

I don't see a good way ti have somle labeling for text question, maybe:

  • <label class="hide">Answer here</label><input class="text" type="text" />
  • use ARIA label
  • Add a question title and use it for label (but need more modification).

( i don't know where to find LS buil number with git, but it's the last
https://github.com/LimeSurvey/LimeSurvey/commit/0f823db470a16e4c334e03d16ab78b8c64fea505

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)00000
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionMysql 5.1.49
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.3.3-7

Relationships

child of 04948 closedmagiclko "label for' tags for certain forms fields 

Users monitoring this issue

DenisChenu, magiclko

Activities

TMSWhite

TMSWhite

2012-02-22 20:15

reporter   ~17565

So, <label> should use the for='id' attribute for associating labels with elements, rather than trying to surround the elements.

DenisChenu

DenisChenu

2012-02-23 08:48

developer   ~17576

<label for="thename">Some information</label><input name="thename" />

id is a very good optimisation:
<label for="thename" id="label-thename">Some information</label><input name="thename" id="thename" />

But label mee "Some information", <label for="thename"><input name="thename" /></label> is NOT a solution.

I don't have THE solution, i think:

TMSWhite

TMSWhite

2012-02-23 15:04

reporter   ~17580

Given that WAI-ARIA just got W3C candidate recommendation status last month, I think it is a bad idea to try to support it right now. Also, we'd need to continue to use <label> to provide backwards support for older browsers.

WAI-ARIA is good to think about for optional HTML 5 support in the future.

TMSWhite

TMSWhite

2012-02-23 16:08

reporter   ~17586

Do we have anyone who can provide feedback from a Section 508 compliance perspective (that's the USA set of rules), or comparable international ones? I'm not well versed in that area.

Currently, <label> is nice because you can click on the text and toggle the value of the associated control. So, if you have a checkbox or radio button, you can click on the text rather than exactly hitting the input control.

However, <label> does nothing for sighted users for array-style questions. So, do we really need it there?

Also, for <textarea> and <input type='text'>, clicking on the text does shift focus to the input box, but it doesn't toggle the value. Is such a shift of focus an accessibility goal? If not, then I see no harm in removing those <label> tags.

DenisChenu

DenisChenu

2012-02-23 18:25

developer   ~17597

Last edited: 2012-02-23 18:34

All input need a label for accessibility.

Label mean : "What is the input for ?"
Without label you give no-information for accessibility and RGAA/Section508 etc ... are breaked. ( and label without content have the same issue).
(RGAA = Section 508).

You can try http://www.cynthiasays.com/ , but you can use too http://lynx.isc.org/ . Best is to have some information from user.

I have a link to answer of a survey by a concurrent system: no javascript => no answer . I think LimeSurvey have to be accessibility best compatible.

Denis
PS: aria-label and aria-labelledby aren't for IE6/IE7 user. It's for FANG/reader system user.

DenisChenu

DenisChenu

2012-02-24 09:58

developer   ~17602

Reminder sent to: magiclko

Hello magiclko,

You make the modification for "label for' tags for certain forms fields. I think the modification can be good for some survey, but can be very bad for other.

Question text can be very long, can have some link, some "javascript link" ( show image for example).
And maybe some input and label inside.

I think easiest way are :
<label for="answerXXX" class="hide">Fill here</label><input type="text" name="answerXXX" />

With hide, you remove from visibility for all user, but show for blind user.

After, we can add : aria-required, aria-describedby.

Denis

DenisChenu

DenisChenu

2012-02-24 10:05

developer   ~17603

Last edited: 2012-02-24 10:06

Hello,

I ask at a accessibility mailing list, and the answer is :
Using aria way is actually a good solution, JAWS (the web reader most using) use a lot af aria since version 9 for windows. FireFox/Opera/Chrome/Safari use aria for a long time. And IE8 use some aria element. A quote from 2008:
<blockquote>Screen readers that already support this feature are NVDA, JAWS 9.0, and Window-Eyes 5.5 or higher. JAWS 8 does not support this attribute yet. Also, ORCA does not seem to pick this attribute up yet, at least my testing showed that Orca did not indicate the required state to me when tabbing through that form.</blockquote> http://www.marcozehe.de/2008/02/29/easy-aria-tip-1-using-aria-required/

I think too of

  • aria-required for mandatory,
  • aria-live for em_validation tip
  • aria-hidden for conditionnal question

And maybe some optimisation for accessibility without touching of visibility without screen reader.

Denis

PS: had to work on table too ... Arf .... table accessibility first.

c_schmitz

c_schmitz

2012-02-26 14:19

administrator   ~17639

@TMSWhite: That's exactly the reason why I requested in 04948 that this would be an optional feature which can be switched on/off in the question attributes (and defaults to true).

@magiclko: Can you please fix this up so there is a question attributes 'High accessibility' which defaults to true and if switched off leaves out the labels.
Thank you.

c_schmitz

c_schmitz

2012-02-27 00:21

administrator   ~17659

After reading Shnoulles comment again I am tending to support the suggestion to use the invisible label instead (if that's really visible to the screen reader).
Does a label hidden by a class really still show to blind people?

DenisChenu

DenisChenu

2012-02-27 09:29

developer   ~17662

Last edited: 2012-02-27 09:29

Hello:

positon:absolute,top=-9999px,left:-9999px : reading ( actual hide css in all included template, maybe some correction ( left:auto ) but it's a solution.
text-indent: -999999px : reading
display:none : not reading
visibility:hideen : no reading

I don't know for opacity:0, but i think reading.
Can have a look at webaim.org/techniques/css/invisiblecontent/ ( I know a lot of french semi-official site for accessibility, but not english site, sorry)

But there another good alternative i think:

  • Optional : At question-text / inline but hidden label / actual way ( no label but an alt for input ) : inline but hidden by default

We can use this optionnal attribute at some question to have some specific accessibility issue on another question ( fieldset on radio list for example)..

for hide in user template : if i had time for http://bugs.limesurvey.org/view.php?id=5807 for 2.0, it can be very good. But included template have this class for a long time ago.

c_schmitz

c_schmitz

2012-03-03 02:25

administrator   ~17726

1.92 released

Related Changesets

LimeSurvey: Yii c83cc198

2012-02-28 12:37:20

DenisChenu

Details Diff
Fixed issue 05846 and 04948: accessibility for some question type : add label
Dev : Add label for short-text long-text huget-text numeric date list-dropdown langage switch
Affected Issues
05846
mod - application/helpers/qanda_helper.php Diff File
mod - application/helpers/replacements_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-02-22 19:47 DenisChenu New Issue
2012-02-22 20:15 TMSWhite Note Added: 17565
2012-02-23 08:48 DenisChenu Note Added: 17576
2012-02-23 15:04 TMSWhite Note Added: 17580
2012-02-23 16:08 TMSWhite Note Added: 17586
2012-02-23 18:25 DenisChenu Note Added: 17597
2012-02-23 18:34 DenisChenu Note Edited: 17597
2012-02-24 09:40 DenisChenu Issue Monitored: DenisChenu
2012-02-24 09:41 DenisChenu Relationship added child of 04948
2012-02-24 09:58 DenisChenu Issue Monitored: magiclko
2012-02-24 09:58 DenisChenu Note Added: 17602
2012-02-24 10:05 DenisChenu Note Added: 17603
2012-02-24 10:06 DenisChenu Note Edited: 17603
2012-02-26 14:13 c_schmitz Assigned To => TMSWhite
2012-02-26 14:13 c_schmitz Status new => assigned
2012-02-26 14:13 c_schmitz Assigned To TMSWhite => magiclko
2012-02-26 14:19 c_schmitz Note Added: 17639
2012-02-27 00:21 c_schmitz Note Added: 17659
2012-02-27 09:29 DenisChenu Note Added: 17662
2012-02-27 09:29 DenisChenu Note Edited: 17662
2012-02-28 20:51 DenisChenu Assigned To magiclko => DenisChenu
2012-02-29 18:38 DenisChenu Status assigned => resolved
2012-02-29 18:38 DenisChenu Fixed in Version => 1.92
2012-02-29 18:38 DenisChenu Resolution open => fixed
2012-03-01 16:06 TMSWhite Target Version => 1.92
2012-03-03 02:25 c_schmitz Note Added: 17726
2012-03-03 02:25 c_schmitz Status resolved => closed
2012-03-14 21:08 DenisChenu Changeset attached => Import 2012-03-09 13:30:34 Yii c83cc198