Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

CheckboxField creates invalid HTML when required. #2939

Closed
torleif opened this Issue Mar 10, 2014 · 4 comments

Comments

Projects
None yet
6 participants
Contributor

torleif commented Mar 10, 2014

Attribute aria-required not allowed on element input at this point.

…ox" id="ApplicationForm_Form_Terms" required="required" aria-required="true" />

Contributor

torleif commented Mar 10, 2014

A similar thing happens with DropdownField(). It needs a default empty string see: http://www.maxdesign.com.au/2012/11/03/select-required/

While the checkbox field is the opposite, it can't have a value="x" if it is required.

Just a note guys, issue is still there. Should create an extension to remove that 'aria-required' or make a new template for checkboxes. It's not the ideal, so please update us when fixed. Thanks!

caffeineinc pushed a commit to caffeineinc/silverstripe-framework that referenced this issue May 19, 2017

CheckboxField creates invalid HTML when required #2939
- Updated CheckboxField, CheckboxSetField, DropdownField, OptionsetField
 to validate with HTML5 attributes & aria-required.

https://www.w3.org/TR/wai-aria/states_and_properties#aria-required

relates to #4901

PR for review: #6937

caffeineinc pushed a commit to caffeineinc/silverstripe-framework that referenced this issue May 22, 2017

CheckboxField creates invalid HTML when required #2939
- Updated CheckboxField, CheckboxSetField, DropdownField, OptionsetField
 to validate with HTML5 attributes & aria-required.

https://www.w3.org/TR/wai-aria/states_and_properties#aria-required

@tractorcow tractorcow closed this in #6937 May 22, 2017

tractorcow added a commit that referenced this issue May 22, 2017

Merge pull request #6937 from caffeineinc/2930-checkboxfield-invalid-…
…html

CheckboxField creates invalid HTML when required #2939
Contributor

tractorcow commented May 22, 2017

Closed with #6937

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