Opened 6 months ago

Last modified 6 months ago

#36304 assigned Cleanup/optimization

Classes functions (etc) should have a header in the documentation — at Initial Version

Reported by: Sarah Boyce Owned by:
Component: Documentation Version: 5.2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Currently, the docs are slightly inconsistent whether classes/functions have their own header or not.
For example:

Following a conversation on the forum, being generous with headers is preferable because:

  • it improves the table of contents to make it easier to navigate the page for all users
  • the page is more accessible to screen reader users as they can navigate via headers
  • (minor) the djangoproject.com docs search checks the table of contents when ranking search results (so adding headers improves the search results)

The discussion is here: https://forum.djangoproject.com/t/set-toc-object-entries-true-to-auto-add-functions-classes-to-the-pages-table-of-contents/38902/7

I propose that we add that we should have a "duplicate" header above the class/function definition to our writing documentation guide: https://docs.djangoproject.com/en/5.2/internals/contributing/writing-documentation/#guidelines-for-restructuredtext-files

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top