? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
19 Jul 2017

Pull Request for Issue #16994.

Summary of Changes

Adds a new option define if the label in the form should be shown or not.
image

Testing Instructions

  • Create a new field and set the option "Show Form Label" to no
  • Edit an article

Expected result

The label is not shown in the edit form.

Actual result

The option does not exist and a label is always shown.

Documentation Changes Required

The new option has to be documented.

avatar laoneo laoneo - open - 19 Jul 2017
avatar laoneo laoneo - change - 19 Jul 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2017
Category Administration com_fields Language & Strings Templates (admin) Layout
avatar brianteeman
brianteeman - comment - 19 Jul 2017

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)

avatar laoneo laoneo - change - 19 Jul 2017
Labels Added: ? ?
avatar laoneo
laoneo - comment - 19 Jul 2017

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?

avatar brianteeman
brianteeman - comment - 19 Jul 2017

For labels setting to invisible is the best option

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 19 Jul 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2017

I have tested this item successfully on 7d2894d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2017

@ketihar please test this PR.

avatar laoneo
laoneo - comment - 21 Jul 2017

@franz-wohlkoenig I guess we need to wait with testing till we have found a proper way how to be accessible.

avatar brianteeman
brianteeman - comment - 21 Jul 2017

the proper way would be to add class=sr-only

avatar laoneo
laoneo - comment - 24 Jul 2017

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?

avatar brianteeman
brianteeman - comment - 24 Jul 2017

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

avatar laoneo
laoneo - comment - 24 Jul 2017

Are there no attributes for an input element, a screenreader understands?

avatar brianteeman
brianteeman - comment - 24 Jul 2017
avatar laoneo
laoneo - comment - 27 Jul 2017

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.

avatar laoneo
laoneo - comment - 27 Jul 2017

Added the attribute, ok now?

avatar brianteeman
brianteeman - comment - 27 Jul 2017

@laoneo not tested the PR but the code looks correct now

avatar laoneo
laoneo - comment - 27 Jul 2017

Hope you will find time for a test. Anyway thanks for the help.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

will try soon - just wanted to give quick feedback on the concept

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 27 Jul 2017 - Tested unsuccessfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2017

I have tested this item ? unsuccessfully on e947e0d
bildschirmfoto 2017-07-27 um 15 44 34


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.
avatar brianteeman brianteeman - test_item - 27 Jul 2017 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 27 Jul 2017

I have tested this item ? unsuccessfully on e947e0d

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

The doc block explains the problem ;)
$label : (string) The html code for the label

avatar laoneo
laoneo - comment - 27 Jul 2017

Damit. Striped the tags in the last commit, now it should work.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 27 Jul 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 Jul 2017

I have tested this item successfully on 78ff0fa


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.

avatar brianteeman brianteeman - test_item - 27 Jul 2017 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 27 Jul 2017

I have tested this item ? unsuccessfully on 78ff0fa


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

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 alignedscreen shot 2017-07-27 at 15 37 00


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17177.
avatar laoneo
laoneo - comment - 27 Jul 2017

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.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

i can almost guarantee people will report it as a bug.

avatar laoneo
laoneo - comment - 27 Jul 2017

I guess the same applies for the opposite, we will have reports in both conditions.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

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.

avatar laoneo
laoneo - comment - 28 Aug 2017

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.

avatar ketihar
ketihar - comment - 28 Aug 2017

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
.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Oct 2017

@coolcat-creations any Opinion?

avatar coolcat-creations
coolcat-creations - comment - 26 Oct 2017

Let's give it some structure:

grafik

Using a class instead of completely removing it, is better for accessibility.
hide = class hidden
show = class empty

Everyone can do with the labels whatever is needed.

avatar laoneo
laoneo - comment - 27 Oct 2017

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.

avatar laoneo laoneo - change - 27 Oct 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-10-27 06:21:49
Closed_By laoneo
avatar laoneo laoneo - close - 27 Oct 2017
avatar coolcat-creations
coolcat-creations - comment - 27 Oct 2017

#18431
I tried :)

Add a Comment

Login with GitHub to post a comment