Skip to content

Conversation

@lcreid
Copy link
Contributor

@lcreid lcreid commented Nov 24, 2025

Make collection_checkboxes and collection_radio_buttons produce output that's more compliant with https://www.w3.org/WAI/tutorials/forms/grouping/#associating-related-controls-with-wai-aria.

Since the markup changes noticeably, this change is only enabled by setting the configuration option group_around_collections = true:

# config/initializers/bootstrap_form.rb

BootstrapForm.configure do |config|
  config.group_around_collections = true
end

This PR includes changes in the test files:

  • Moved the collection_checkboxes and collection_radio_button tests to their own files.
  • Test collection_checkboxes and collection_radio_button with the group_around_collections options both true and false.

Eventually, this behaviour should become the default, and later, the old behavour should disappear altogether.

Closes: #763.

@lcreid lcreid self-assigned this Nov 24, 2025
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.

collection_radio_buttons not accessible

1 participant