#36304: Classes functions (etc) should have a header in the documentation
--------------------------------------+------------------------------------
     Reporter:  Sarah Boyce           |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  5.2
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Natalia Bidart):

 * stage:  Unreviewed => Accepted


Old description:

> Currently, the docs are slightly inconsistent whether classes/functions
> have their own header or not.
> For example:
> - https://docs.djangoproject.com/en/5.2/ref/utils/ lacks headers for many
> functions e.g.
> https://docs.djangoproject.com/en/5.2/ref/utils/#django.utils.cache.patch_cache_control
> - https://docs.djangoproject.com/en/5.2/ref/models/fields/ has generous
> headers
>
> 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

New description:

 Currently, the docs are slightly inconsistent whether classes/functions
 have their own header or not.
 For example:
 - https://docs.djangoproject.com/en/5.2/ref/utils/ lacks headers for many
 functions e.g.
 
https://docs.djangoproject.com/en/5.2/ref/utils/#django.utils.cache.patch_cache_control
 - https://docs.djangoproject.com/en/5.2/ref/models/fields/ has generous
 headers

 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 we update our documentation guide to include adding a
 "duplicate" header above class or function definitions:
 https://docs.djangoproject.com/en/5.2/internals/contributing/writing-
 documentation/#guidelines-for-restructuredtext-files

--
Comment:

 I think this makes sense and it aligns with the conversation in the forum
 post.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36304#comment:1>
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/0107019615e2ae29-de492a57-40b6-44a8-9c35-54ac989c8206-000000%40eu-central-1.amazonses.com.

Reply via email to