Skip to content

Add conditional for label that ends up blank for checkboxes#532

Open
hdwebpros wants to merge 1 commit intogetgrav:developfrom
hdwebpros:patch-1
Open

Add conditional for label that ends up blank for checkboxes#532
hdwebpros wants to merge 1 commit intogetgrav:developfrom
hdwebpros:patch-1

Conversation

@hdwebpros
Copy link
Copy Markdown
Contributor

Without this conditional, checkboxes render a blank label

<div class="form-label"><label class="inline"></label></div>

Having the blank label screws with accessibility.

Sure, you can manually set each checkbox to display_label: false but that in itself is confusing since removes the broken label and keeps the checkbox label. Since the default checkbox no matter what creates a blank div and label, the best way around this is to just add this conditional

Without this conditional, checkboxes render a blank label
`<div class="form-label"><label class="inline"></label></div>`

Having the blank label screws with accessibility.

Sure, you can manually set each checkbox to `display_label: false` but that in itself is confusing since removes the broken label and keeps the checkbox label. Since the default checkbox no matter what creates a blank div and label, the best way around this is to just add this conditional
@NicoHood
Copy link
Copy Markdown
Contributor

Related: #442

@hughbris
Copy link
Copy Markdown
Contributor

Related: #442

And #450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants