When I create a link field and assign it a label of "link", I expect to see "link" on the entity form. Instead I see only "URL" and "Title." There's discussion in #1801268: Change link field 'title' field to 'link text' of changing those property labels to make them clearer. That will help, but even with clearer property labels, the field label not showing seems like a bug.
Comment | File | Size | Author |
---|---|---|---|
#23 | morethanone.png | 187.49 KB | YesCT |
#11 | Screen Shot 2013-04-06 at 9.22.55 AM.png | 8.01 KB | larowlan |
#10 | link-label-1957670.10.interdiff.txt | 441 bytes | larowlan |
#10 | link-label-1957670.10.patch | 2.28 KB | larowlan |
#5 | link-label-1957670.5.interdiff.txt | 1.01 KB | larowlan |
Comments
Comment #1
larowlanComment #2
larowlanFirst a test to demonstrate the label is not output.
Then the fix.
I used a details element here, because container does not allow a title.
But perhaps we should refactor container to allow #title - although details is better for a11y.
Comment #3
larowlanThis is a UX improvement too.
Before
After
Adding some tags to get some input from UX and a11y experts.
Comment #4
andypostI think this needs extended test to change cardinality
Comment #5
larowlanGood call, extra-test-coverage++
Comment #6
andypostYes, that's enough
Comment #7
falcon03 CreditAttribution: falcon03 commentedI didn't notice this issue before.
Maybe we should use a fieldset instead of a
<details>
to wrap the widget form fields.Comment #8
andypost@falcon03 Please take a look at #1168246: Freedom For Fieldsets! Long Live The DETAILS.
The scope of the issue to fix a bug, accessibility issue is #1801268: Change link field 'title' field to 'link text'
Comment #9
mgifford@andypost - I think that would be semantically better as a fieldset actually. I was quite involved in @sun's campaign for DETAILS.
The move to details was partly a shift for the visual element of having a collapsible fieldset hack that we used in everything prior to D8. There wasn't usually a semantic relationship between the fields.
However with dates, checkboxes, radios and other compound form elements are a group of input fields which are properly organized with a fieldset & legend in order to pass on their relationship to each other.
Related link #504962: Provide a compound form element with accessible labels
Comment #10
larowlanHere it is with fieldset instead
Comment #11
larowlanScreenshot
Mike - if this is better for a11y (and I like it not being collapsible) - please put back to RTBC.
My first attempt used a fieldset but I thought they were no-go except for radio groups - thanks for clarifying.
Comment #12
andypostI'd like to see this collapsible by default. Because better to have ability to free the screen area for complex elements once they do not need changes (node edit for example)
Comment #13
mgiffordI'm pushing it back to RTBC. I'll cycle back about the collapsible piece, but ultimately this is the kind of thing that fieldsets have always been used for.
I don't imagine there's any way to default to having both the URL & Title on on line is there? I'm not sure if that would break some UX pattern. It would of course have to be responsive.
Comment #14
andypostBut current implementation does not allow the fieldset to be collapsed
Comment #15
larowlanI don't think collapsibility is the goal here, adding a label to the field is.
The collapsibility was a by-product of using the details in the first patch - but only because I thought fieldsets were off-limits.
No other fields are collapsible - people can use a fieldgroup contrib module or form_alter if they want to maximise edit space.
Adding '#collapsible' => TRUE is mis-use of the fieldset element in my opinion.
Thoughts?
Comment #16
sreynen CreditAttribution: sreynen commentedI agree collapsibility isn't the goal here. Maybe it could be the goal for another issue?
Comment #17
Bojhan CreditAttribution: Bojhan commentedThe collapsible part should be discussed in a followup I dont think its needed at this time.
Comment #18
alexpottCommitted c44404a and pushed to 8.x. Thanks!
Comment #19
Bojhan CreditAttribution: Bojhan commented@alex you had this tab open waay to long :P tnx for commit
Comment #20
klonos...#1968050: Allow the Link fieldset to be collapsed.
Comment #22
YesCT CreditAttribution: YesCT commentedI'm working on another issue, #2416987: Fix UI regression in the menu link form and I wonder why this is cardinality == 1.
I would have thought it would be > 1
or >= 1
why have it in an if at all?
Comment #23
YesCT CreditAttribution: YesCT commentedoh, this is why you dont want a fieldset on each when there is more than one.
they are already grouped (so they can be dragged)
:)