#36829: Breaking change in ClearableFileInput
-------------------------------------+-------------------------------------
     Reporter:  Johannes Maron       |                    Owner:  Johannes
                                     |  Maron
         Type:  Bug                  |                   Status:  assigned
    Component:  Forms                |                  Version:  6.0
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

 * cc: David Smith (added)

Comment:

 Thanks for the report. I'm assuming that the change was intentional and
 regarded as a bugfix, which we don't document. I'm not certain whether we
 shouldn't just resolve this with a release note and versionchanged
 annotations.

 Docs say:

 > when the widget contains multiple <input> tags such as ...

 By that criterion, `use_fieldset` should be True here, modulo the
 configurability of `required=True` or no initial value causing the
 checkbox to not render.

 The [https://docs.djangoproject.com/en/6.0/misc/api-stability/ API
 stability policy] mentions that minor changes may be necessary on upgrade.
 Johannes, can I ask what inconvenience this amounted to: have you authored
 a library that now has to fork on this behavior change?

 ----

 David considered setting `use_fieldset = True` on `ClearableFileInput`
 from the get-go, but hesitated given the checkbox not being present if
 `required=True` or no initial value:

 > ClearableFiles render in different ways. It is possible to get a
 checkbox and a file field input with this one, and I wonder if we should
 be adding a fieldset in that scenario

 and received mixed feedback:

 [https://github.com/django/django/pull/15317#issuecomment-1059091155
 against]:

 > I'm not sure fieldset is needed in that case, aria attributes here will
 be the aria-controlsand aria-label to know that there is a button action
 and the title of the action.

 [https://github.com/django/django/pull/15317#pullrequestreview-922494843
 in favor]:

 > Based on a quick review, yes, I think it would make sense to have a
 fieldset for this, although it looks like the template would need further
 work (missing a label as well for the input?) so it’d warrant a more
 thorough review (and its own ticket).

 ... with the result that it was just tabled.

 David, do you have any opinion about whether to retain this change as a
 bugfix?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36829#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019b6acae150-4144d73a-b5b9-411c-b446-16820bd03950-000000%40eu-central-1.amazonses.com.

Reply via email to