Re: [Django] #35382: Remove unused CSS style `.inline-related fieldset.module h3` (was: Low contrast background color for fieldset headings within inline formsets)

6 views
Skip to first unread message

Django

unread,
Apr 19, 2024, 10:35:07 AM4/19/24
to django-...@googlegroups.com
#35382: Remove unused CSS style `.inline-related fieldset.module h3`
-------------------------------+------------------------------------
Reporter: Sarah Boyce | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 5.0
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Natalia Bidart):

* summary:
Low contrast background color for fieldset headings within inline
formsets
=> Remove unused CSS style `.inline-related fieldset.module h3`


Old description:

> `.inline-related fieldset.module h3` has a background color of `#bcd` and
> text color of `#fff`
> This is hard to read and fails WCAG AA and WCAG AAA (this can be tested
> here [https://webaim.org/resources/contrastchecker/])
>
> Under Child: #1 and above Fields, see "Name" with the poor contrast
> [[Image(Color.png)]]

New description:

Currently, the CSS definition in `forms.css` for `.inline-related
fieldset.module h3` (which is at least 16 years old) is not being used in
the Django code base. The only templates using the `inline-related` CSS
class are contrib/admin/templates/admin/edit_inline/tabular.html and
contrib/admin/templates/admin/edit_inline/stacked.html, and the former
only uses `h3` elements inside a `div` element which does not fulfill the
CSS rule, and in the latter there is no usage of `h3` at all.

--
Comment:

During a
[https://discord.com/channels/856567261900832808/1230781298637803542/1230829219571957771
Discord conversation between Sarah and Ben], they realized that this low-
contrast issue was only reproducible in the context of a PR fixing #35189,
meaning that the issue is not present in `main`. So we are re-purposing
this ticket to confirm and delete the unused CSS style `.inline-related
fieldset.module h3`.
--
Ticket URL: <https://code.djangoproject.com/ticket/35382#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages