Skip to content

Register heading title to add it back as title attribute #33

@pawamoy

Description

@pawamoy

@waylan noticed that links created by autorefs with the [title][id] syntax do not have a title HTML attribute. It would be nice to have a title in any case:

  • for object headings, using the object's complete identifier (dotted-path in Python) as title
  • for text headings, using the actual title

As to how to record these:

  • mkdocstrings' do_heading filter can probably use the passed id
  • when picking up the rest of headings, autorefs could register their contents alongside their slugs and URLs

An alternative would be to reuse the provided identifier in [title][id] as title HTML attribute if it is different than the provided title, but that would only make sense for objects, not regular headings (we don't want to show a tooltip on hover with a heading's slug).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions