Opened 4 months ago

Last modified 4 months ago

#35875 assigned Cleanup/optimization

Dark mode support for django/views/templates/*.html

Reported by: Emme Bravo Owned by: Emme Bravo
Component: Core (Other) Version: dev
Severity: Normal Keywords: accessibility
Cc: Thibaud Colas Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes
Pull Requests:18801 build:success, 18771 unmerged

Description

Django’s directory_index view uses simple HTML to display a list of files (see demo/directory_index). It would be helpful if this was displayed in a dark theme when the user’s operating system is configured to use one, just like the Django admin.

This can be achieved with the color-scheme meta tag, which will tell the browser the page is ready to adapt based on the user’s operating system preferences:

<meta name="color-scheme" content="light dark" />

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (3)

comment:1 by Sarah Boyce, 4 months ago

Cc: Thibaud Colas added
Summary: Dark mode support for directory_index viewDark mode support for django/views/templates/*.html
Triage Stage: UnreviewedAccepted

It sounds like there's a request to support dark mode in places other than the admin, including the congrats page
Accepting on the grounds that I believe this has accessibility benefits and discussed with Thibaud, cc-ing to confirm.

I'd like to increase the scope of this ticket to all templates in django/views/templates. Each one can be worked on separately with Refs #35875 -- but don't think we need to keep creating new tickets for each one.

comment:2 by Tim Graham, 4 months ago

Component: Generic viewsCore (Other)

comment:3 by Emme Bravo, 4 months ago

Owner: set to Emme Bravo
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top