I have an ACF radio that is set to return value “both”. I did this because I would like to give a section a dynamic attribute to apply CSS styles based on the value of the radio field.
Example:
Radio field selected:
received : Application received
<section class="section-c738de cc-sct" status="received">
<span class="acf-radio-style">Content that </span>
</section>
The dynamic attribute also does not seem to work inside a Query Template.
I would also like to be able to style elements inside a Query Template based on the value of an ACF.
could you give me some more information on what to expect please? I don’t need an exact time frame but it would be helpful to know if I can expect this to work in the next months or so because this would affect how I build the current project.
This should be addressed in 1.2.9.5.7.
More specifically, attributes for checkbox/radio ACF values should now use value, the same applies to conditions as well.
If you still have trouble or run into specific issues, I’d be grateful if you can let me know by replying to this thread.
would it be possible to add the option to chose whether the label or the value should be used for the attribute?
Now I have a situation where I need the Label to use it for the “aria-label” attribute.
The reason it would be helpful to also have the option to use the label in the attributes is for example this case:
I have a repeater where my client can fill out their Social Media information. Frist they select the name of the SM platform and then they paste the url to their profile in a url field.
The selection field is set up to return both the value and the label. The value is an icon tag and the label is the name of the SM platform like this:
<i class="icon-facebook"></i> : Facebook
Now when I use this information in my template I use a paragraph that returns the value – so the icon – and attach the url to the paragraph. Now I would like to place a proper aria-label so that people who use screenreaders know what this link does. That’s where the label for the attribute comes in. I would like to give this link the aria-label (Facebook in this case).