1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides
Jonathan Hefner e6950a332a Add label attribute to <option> from include_blank
The `:include_blank` option of various `<select>`-related helpers causes
an `<option>` element with no content to be rendered.  However, the
[HTML spec] says that unless an `<option>` element has a `label`
attribute (which must be non-empty), its content must be "Text that is
not inter-element whitespace."

In #24923, this issue was addressed for `select_tag` by adding a `label`
attribute to the `<option>`.  This commit addresses the issue in the
same manner for `FormBuilder#select` and various date / time select
helpers.

[HTML spec]: https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element
2020-07-24 15:45:18 -05:00
..
assets Merge pull request #39777 from p8/guides/rouge-highlighting 2020-07-08 13:59:30 +01:00
bug_report_templates Add Action Mailbox bug report templates 2020-07-15 11:04:12 -04:00
rails_guides Highlight CSS code snippets in guides 2020-07-13 01:28:35 +01:00
source Add label attribute to <option> from include_blank 2020-07-24 15:45:18 -05:00
.document
CHANGELOG.md Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
rails_guides.rb
Rakefile Remove references to WARNINGS environment variable [ci skip] 2020-07-05 16:40:52 +01:00
w3c_validator.rb