Skip to content

Duplicated dev docs warning on docs theme #2167

@thibaudcolas

Description

@thibaudcolas

On docs pages in the dev version like Using Django, our "This document is for Django's development version," warning is duplicated in the page HTML. Once at the top of the <body>, and another time at the bottom.

This seems to come from this JS script, that creates a clone of the element and then adds it to the page:

// This element will dynamically enforce the correct amount of top spacing
const warning_el_copy = warning_el.cloneNode(true);
warning_el_copy.style.position = 'relative';
document.body.prepend(warning_el_copy);

I don’t think this is a big issue but definitely not good for users of assistive tech that the same content is on the page multiple times. The JS should be simple to change, but I’m not sure how much the styling of the warning relies on there being two copies like this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions