Re: [Django] #26928: Change checkbox/radio checked attribute to HTML5 boolean style

6 views
Skip to first unread message

Django

unread,
Jul 22, 2016, 1:11:08 AM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jdufresne):

* needs_docs: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

[https://github.com/django/django/pull/6961 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 22, 2016, 2:05:43 AM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
--------------------------------------+--------------------
Reporter: jdufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
As Django supports HTML5 boolean attributes and they are used for
[https://github.com/django/django/blob/bc1e9e823b7dd3fa68dc1678edeb09e2ae1a990c/django/forms/boundfield.py#L88-L91
existing form attributes] internally, I think the checkbox/radio `checked`
attribute should be converted to use HTML5 boolean style as well.

--
Ticket URL: <https://code.djangoproject.com/ticket/26928>

Django

unread,
Jul 22, 2016, 11:31:29 AM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

`required` and `disabled` were added recently so I guess backwards-
compatibility wasn't much of a concern. Are there any backwards-
compatibility concerns for projects not using an HTML5 doctype?

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:2>

Django

unread,
Jul 22, 2016, 1:14:34 PM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jdufresne):

> Are there any backwards-compatibility concerns for projects not using an
HTML5 doctype?

I'm not aware of any for modern browsers. Just now, I tested the following
HTML document:

{{{
<html>
<head>
<title>Test</title>
</head>
<body>
<p>
<input type="checkbox" checked>
</p>
</body>
</html>
}}}

Against the doctypes listed on [https://www.w3.org/QA/2002/04/valid-dtd-
list.html w3.org].

All of these doctypes worked with recent versions of Firefox and Chrome --
they rendered the checkbox as checked on page reload. I currently do not
have easy access to IE for testing.

If you think it would help, I could add a blurb to the "Backwards
incompatible changes" section of the release notes.

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:3>

Django

unread,
Jul 22, 2016, 2:33:24 PM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

I'd like to ask on the DevelopersMailingList if anyone has concerns about
this change.

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:4>

Django

unread,
Jul 22, 2016, 5:32:30 PM7/22/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
-------------------------------------+-------------------------------------
Reporter: jdufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jdufresne):

[https://groups.google.com/forum/#!topic/django-developers/06FZAJooX6w
Django developers thread]

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:5>

Django

unread,
Jul 27, 2016, 8:16:09 AM7/27/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
--------------------------------------+------------------------------------

Reporter: jdufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:6>

Django

unread,
Aug 4, 2016, 7:17:49 PM8/4/16
to django-...@googlegroups.com
#26928: Change checkbox/radio checked attribute to HTML5 boolean style
--------------------------------------+------------------------------------
Reporter: jdufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"50e299dbfbbfd796e63e7e13b4566cf69d2c4acb" 50e299d]:
{{{
#!CommitTicketReference repository=""
revision="50e299dbfbbfd796e63e7e13b4566cf69d2c4acb"
Fixed #26928 -- Changed forms' checked attribute to HTML5 boolean style.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26928#comment:7>

Reply all
Reply to author
Forward
0 new messages