User tests: Successful: Unsuccessful:
Pull Request for Issue #16994.
Adds a new option define if the label in the form should be shown or not.
The label is not shown in the edit form.
The option does not exist and a label is always shown.
The new option has to be documented.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_fields Language & Strings Templates (admin) Layout |
Labels |
Added:
?
?
|
Better to keep the label but give it a class of sr-only (or similar)
Or can the label be added as attribute to the DOM element? Are there similar attributes like the alt tag is on images?
For labels setting to invisible is the best option
I have tested this item
@franz-wohlkoenig I guess we need to wait with testing till we have found a proper way how to be accessible.
the proper way would be to add class=sr-only
This feature exists for quite some time (it was just not supported by custom fields), would it then not be a BC break when we start showing up the label all of the sudden, just with an extra class?
I could only find documentation for BS3 and above for the class sr-only
. Would it mean that every template has to support it as the feature should also work on the front end?
This feature exists for quite some time (it was just not supported by custom fields), would it then not be a BC break when we start showing up the label all of the sudden, just with an extra class?
Where?
I could only find documentation for BS3 and above for the class sr-only. Would it mean that every template has to support it as the feature should also work on the front end?
Yes sorry sr-only is a bs3 class. We added element-invisible as a class in Joomla 3 that does the same thing
The only other option i can think of would be an inline style of display: none but thats not great either
Are there no attributes for an input element, a screenreader understands?
yes its called a label ;)
https://www.w3.org/WAI/tutorials/forms/labels/#note-on-hiding-elements
I'm talking about attributes like the alt tag of an image. The purpose of this pr is to add a new option to hide the label in the form.
Added the attribute, ok now?
Hope you will find time for a test. Anyway thanks for the help.
will try soon - just wanted to give quick feedback on the concept
I have tested this item
I have tested this item
Sorry serves me right for commenting without testing
you cant do <?php echo $label; ?>
as that includes all the markup of the label from renderlabel.php- you need the raw value of the label
The doc block explains the problem ;)
$label : (string) The html code for the label
Damit. Striped the tags in the last commit, now it should work.
I have tested this item
I have tested this item
is that css really what you want?
I would have thought this was a good example of the hide label - where field 2 is address 2. So I would expect the fields to be aligned
This option makes sense when you not mix them with fields which have a label. Similar to what we have with the description of the article.
i can almost guarantee people will report it as a bug.
I guess the same applies for the opposite, we will have reports in both conditions.
Which is more likely. A form where all fields don't have labels or a form where some do and some don't? If it's the latter them this pr is incorrect as the fields are not aligned.
What should we do here, covering both cases would be hard. Would be nice if we can get feedback of @coolcat-creations and @ketihar, which both have opened an issue which is related to this pr.
I don't see any problem hiding specific labels even if other are visible.
Is about user needs. View result is about user taste. For example you can
use placeholder for every input field and labels for checkboxes e.t.c
Στις 28 Αυγ 2017 10:24 ΠΜ, ο χρήστης "Allon Moritz" <
notifications@github.com> έγραψε:
What should we do here, covering both cases would be hard. Would be nice
if we can get feedback of @coolcat-creations
https://github.com/coolcat-creations and @ketihar
https://github.com/ketihar, which both have opened an issue which is
related to this pr.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17177 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGcdyVE1DtHtfz3c-IplctoQ--4iP94Oks5scmsUgaJpZM4OcZYl
.
@coolcat-creations any Opinion?
I'm closing this pr, as the suggestion of @coolcat-creations should be done in its own pr and we do not find here an agreement how to handle margin situation properly. Thanks so far for the feedback. Perhaps on some point somebody else will come up with a proper solution.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-27 06:21:49 |
Closed_By | ⇒ | laoneo |
Unless I misread the code this is not "hiding" the label it is excluding the label. This is not good for accessibility. Better to keep the label but give it a class of sr-only (or similar)