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
Showing
想要评论请 注册 或 登录