Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Sep 2011 at 11:29 UTC
Updated:
13 Dec 2019 at 15:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
stella commentedHere's a D7 version too. This one can one step further and still print the label tag but with the new D7 "element-invisible" class.
Comment #2
quicksketchThanks stella, I haven't had time to look at this patch so it got buried in the Webform queue. The D6 patch looks pretty good.
In the D7 patch, this doesn't seem to make any sense, why would you run check_plain() on a property that doesn't exist? Even if the logic is inverted, what's this providing?
It'd probably be better to move this bit of code up above the setting of the $element variable.
Comment #3
stella commentedNow I'm confused. Does
$component['name']not exist here?The code is essentially the same as the D6 version, which says if there is no value set for
$component['extra']['attributes']['title'], then use the sanitized$component['name'].Maybe I'm missing something here, but I don't see how it differs from the D6 patch you approved.
Comment #4
quicksketchOh, for some reason I thought the code was this, just setting the property to itself:
I'm just being crazy apparently. I'll take another look at this.
Comment #5
stella commentedHi Nate, did you have a chance to review this again? Fixing status.
Comment #6
mgiffordThe title attribute is certainly a good way to do this. In D7 you can also just add
'#title_display' => 'invisible',when defining the form element and it will be hidden to the display, but also accessible to screen readers. It doesn't use the title attribute, but it still meets WCAG 2.0 AA guidelines.Comment #7
liam morlandReroll.
Comment #8
mgiffordThat works well. I spun up an instance with SimplyTest.me and grabbed this screenshot:

Thanks for pushing this ahead Liam.
Comment #9
liam morlandComment #10
carwin commentedThanks Liam and stella, this is committed to the 7.x-4.x branch.
Comment #11
mgiffordThanks!
Comment #12
quicksketchThis patch introduced a Notice error when creating components: #2020705: Notice: Undefined index: name in webform_component_defaults().
Comment #13
andrewmacpherson commentedRe-rolling for people still using 7.x-3.x (the patches above no longer apply).
Are backports to 7.x-3.x still being considered?
Comment #14
quicksketchSure @andrewmacpherson, I think this would be valid for backporting. Thanks for the reroll. I'm not updating the 7.x-3.x as frequently as the 7.x-4.x branch, but I'll make sure this gets in next time I'm reviewing patches.
Comment #15
mgiffordDid this get in 7.x-4.0-beta1?
Comment #16
liam morlandYes.
Comment #17
quicksketchThe 4.x patch was causing PHP notices apparently. This patch was revised in #2020705: Notice: Undefined index: name in webform_component_defaults() to work in a more graceful manner. The 3.x backport no longer applies and should use the same approach used in that fix. Really I'd prefer to just say, "use 4.x", but if this patch is rerolled for 3.x it'll get in eventually.
Comment #18
mgiffordAt this rate, it looks like the 4.x branch is going to be out before we get a patch for this issue into 3.x.
That's fine with me. Thanks for fixing the PHP notices.
Comment #19
rreiss commented#13 Works for me. Thanks!
Comment #20
danchadwick commented7.x-3.x is receiving critical fixes only.
Comment #21
tlyngej commentedFor those in need, here is a reroll of the patch that applies to 3.23
Comment #22
liam morlandThis is fixed in 7.x-4.x.
Comment #23
spokjeReroll of patch in #21 against the latest HEAD of the 7.x-3.x branch.