Page 1 of 1
Label confusion
Posted: Sun Apr 06, 2025 4:25 am
by ssbbstw
Re: Label confusion
Posted: Sun Apr 06, 2025 6:27 am
by Pablo
In the project you have shared, I do not see anything wrong.
Re: Label confusion
Posted: Sun Apr 06, 2025 11:31 am
by ssbbstw
Re: Label confusion
Posted: Sun Apr 06, 2025 11:57 am
by Pablo
In the project you have shared, it works correct for me.
If it does not work for you then please update the project to demonstrate the issue.
Re: Label confusion
Posted: Sun Apr 06, 2025 2:42 pm
by ssbbstw
This is my designed screen:
What is your screen?
Re: Label confusion
Posted: Sun Apr 06, 2025 5:01 pm
by Pablo
The problem is that you are using the form as embedded page.
In that case 'for' will not work.
Re: Label confusion
Posted: Mon Apr 07, 2025 3:42 am
by ssbbstw
Re: Label confusion
Posted: Mon Apr 07, 2025 3:55 pm
by ssbbstw
Pablo wrote: Sun Apr 06, 2025 5:01 pm
The problem is that you are using the form as embedded page.
In that case 'for' will not work.
None of these problems about v19.4.4!!
Re: Label confusion
Posted: Mon Apr 07, 2025 5:03 pm
by Pablo
There have been no changes to this functionality, so you must be doing something different.
If you need further help then please provide a demo.
Re: Label confusion
Posted: Mon Apr 07, 2025 11:33 pm
by ssbbstw
Pablo wrote: Mon Apr 07, 2025 5:03 pm
There have been no changes to this functionality, so you must be doing something different.
If you need further help then please provide a demo.
The "demo" is file ".wbs"? or website?
Re: Label confusion
Posted: Tue Apr 08, 2025 12:51 am
by crispy68
it's a .wbs file.
Re: Label confusion
Posted: Tue Apr 08, 2025 3:33 am
by BaconFries
Before you share the project (.wbs) please carefully read all of the information from the url below.
Example of what to share.
1 page only with the issue(s) remove any manually added code/script (php) you use, remove any extensions used.
viewtopic.php?t=82134
Re: Label confusion
Posted: Tue Apr 08, 2025 9:12 am
by ssbbstw
BaconFries wrote: Tue Apr 08, 2025 3:33 am
Before you share the project (.wbs) please carefully read all of the information from the url below.
Example of what to share.
1 page only with the issue(s) remove any manually added code/script (php) you use, remove any extensions used.
viewtopic.php?t=82134
I used an embedded approach to design the website, and if there is only one page design, it is impossible to test the problem.
Re: Label confusion
Posted: Tue Apr 08, 2025 9:39 am
by AliGW
Include in the .wbs file JUST what is needed to demonstrate the problem. Leave out anything that is not relevant.
Re: Label confusion
Posted: Tue Apr 08, 2025 10:03 am
by BaconFries
I used an embedded approach to design the website, and if there is only one page design, it is impossible to test the problem.
When I wrote only one page it was referring to the page that is using the embed page and not your full site or a link/url. Having to go through page after page is time consuming so that is why it is asked to provide only what is required.
And to be honest you already know this as you have previously shared projects (.wbs).
Re: Label confusion
Posted: Tue Apr 08, 2025 3:58 pm
by ssbbstw
Re: Label confusion
Posted: Tue Apr 08, 2025 5:12 pm
by Pablo
You wrote that it worked in version 19. So, I need a WB19 project so I can see the difference.
As far as I know this did not work in WB19 either. It was not designed to be used this way.
In my opinion, you will need to solve this in a different way.
Re: Label confusion
Posted: Tue Apr 08, 2025 11:59 pm
by ssbbstw
Please ignore the saying that WB19 is effective!
As long as the problem on WB20 can be solved.
Re: Label confusion
Posted: Wed Apr 09, 2025 1:20 am
by ssbbstw
I found that the layoutGrid is correct if it has only one column.
bad is two column.
test ok.
https://app.box.com/s/qsez0vczcgrmx4lvz2u1bidshm76s26u
Re: Label confusion
Posted: Wed Apr 09, 2025 5:36 am
by Pablo
I'm sorry there is no easy way to implement this functionality. It is related to the way label is nested.
Re: Label confusion
Posted: Wed Apr 09, 2025 8:36 am
by ssbbstw
Pablo wrote: Wed Apr 09, 2025 5:36 am
I'm sorry there is no easy way to implement this functionality. It is related to the way label is nested.
I change 'Label' to 'Text', It's all right.
Why ?
Re: Label confusion
Posted: Wed Apr 09, 2025 9:40 am
by wwonderfull
Was just reading the post for a long time and wanted to share some knowledge.
Using label is a perfectly fine practice both for accessibility and for visual way of reading a label. Now it is about the tricks on how we develop the site in a way which serves the purpose along with the design in an intuitive way.
If I were to do a workaround for this problem, then instead of below code:
Code: Select all
<label for="username">Username</label>
<input type="text" id="username">
I would use the aria-label attribute which is equal in terms of accessibility almost like a replacement for the labels for attribute but does not visually show a textual label but is readable on the client code side although it will pass the google lighthouse test for accessibility for screen readers without visually displaying a label:
Code: Select all
<input type="text" aria-label="Username">
But at the same time, we can just use a normal text mimicking as a label and have both visual text and accessibility using the attribute "area-label"
So final output could be like this:
Code: Select all
<span>Username</span>
<input type="text" aria-label="Username">
If you still need help you can write to me from contact.
Note: that now a days people use placeholders and don't actually use labels much on modern websites as I have seen. But if still it is needed for some reason, then can use labels which is fine. But as you are using embedded pages, I have offered you a solution insight.
Re: Label confusion
Posted: Wed Apr 09, 2025 11:16 am
by Pablo
I change 'Label' to 'Text', It's all right. Why ?
A label is different type of object.
Basically the label needs to find the 'for' element on the page when the code is generated . Normally if can simply scan the page, but if the form is nested in a embedded page then the code does not exist until it is merged at the final stage of the publishing task.
Re: Label confusion
Posted: Wed Apr 09, 2025 1:52 pm
by ssbbstw
wwonderfull wrote: Wed Apr 09, 2025 9:40 am
So final output could be like this:
Code: Select all
<span>Username</span>
<input type="text" aria-label="Username">
But it has no effect.
Can you give me a .wbs test it?
Thank you!

Re: Label confusion
Posted: Wed Apr 09, 2025 1:54 pm
by ssbbstw
Pablo wrote: Wed Apr 09, 2025 11:16 am
I change 'Label' to 'Text', It's all right. Why ?
A label is different type of object.
Basically the label needs to find the 'for' element on the page when the code is generated . Normally if can simply scan the page, but if the form is nested in a embedded page then the code does not exist until it is merged at the final stage of the publishing task.
I'm also a programmer.
I know it will take time to figure out how to solve the problem.
Re: Label confusion
Posted: Wed Apr 09, 2025 3:32 pm
by wwonderfull
ssbbstw wrote: Wed Apr 09, 2025 1:52 pm
wwonderfull wrote: Wed Apr 09, 2025 9:40 am
So final output could be like this:
Code: Select all
<span>Username</span>
<input type="text" aria-label="Username">
But it has no effect.
Can you give me a .wbs test it?
Thank you!
You need to add some style to that <span> or else the span does not have any color font size or even font family. That Example I gave is just for demonstration.
Aria-label, which is an accessibility attribute in HTML. The aria-label is used to provide a textual description for an element that does not have visible text, ensuring screen readers can identify it correctly you can do that same thing with the tools of wysiwyg web builder. Drag and drop a text, then an editbox, write title of the editbox and if you need to add the aria-label attribute you can do that from the object html -->inside tag. So see the image and then try.

Re: Label confusion
Posted: Wed Apr 09, 2025 3:50 pm
by Pablo
Using text as a label for a for field is not correct. You will need to use a label.
Again, the problem is the use of the label on a embedded page (and other strange layout nesting). This is not supported.
You will need to use a different layout concept. For example, a master frame. And keep the number of nested containers (layout grid, tabs, etc limited).
Also, note that placing an embedded page (with flexible layout grid) on a (fixed) form does not make any sense. I strongly recommend to reconsider you layout.
- Forms / Layers are for fixed layout
- Layout grid / flexbox are for flexible layout
If you want implement a form in a layout grid then check the 'enable form' property of the grid.
Re: Label confusion
Posted: Wed Apr 09, 2025 4:08 pm
by wwonderfull
I agree with @pablo because the problem is that labels has issues with embedded page which is the reason "for" attribute is showing different. That is the actual issue. The work around I had shared was removing labels and the whole need of "for" attribute. Not the actual solution though I thought as the "for attribute" has a mismatch it is better to remove it. But as @pablo said if you use master page your labels would work perfectly fine so change the website layout.
Re: Label confusion
Posted: Thu Apr 10, 2025 3:07 am
by ssbbstw
Thanks I will take your suggestions into consideration!
Re: Label confusion
Posted: Thu Apr 10, 2025 3:12 am
by ssbbstw
Sorry, I wanted the layout to be with the text on the left instead of on top.
Re: Label confusion
Posted: Thu Apr 10, 2025 6:09 am
by Pablo
I'm sorry, it is not clear what you trying to do based on your screenshot.
Can you please be more specific.