Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

FormRow helper should not render label for hidden element #5607

Closed
jkavalik opened this issue Dec 12, 2013 · 2 comments
Closed

FormRow helper should not render label for hidden element #5607

jkavalik opened this issue Dec 12, 2013 · 2 comments

Comments

@jkavalik
Copy link

When using annotations on entities to generate Zend\Form, I noticed that if property has assigned type hidden but there is label set, view helper will render label around it:

<label><span>ID#</span><input name="userId" type="hidden" class="form-control" value=""></label>

IMHO there shouldn't be any label rendered. as it seems weird.
At least from accesibility viewpoint I can refer to http://www.w3.org/TR/WCAG20-TECHS/F68.html saying:
Note 2: The label element is not used for ... Hidden input fields (input type="hidden")

Background:
Label is set on hidden field because we are generating other things from annotation and in this case it is there to set column heading in generated table.

@ThaDafinser
Copy link
Contributor

@jkavalik see the PR. Should fix your issue.

weierophinney added a commit that referenced this issue Mar 7, 2014
@ThaDafinser
Copy link
Contributor

@jkavalik can u close this issue, since it was merged?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants