Skip to content

Heading anchor link icon does not copy section URL to clipboard #18558

@Anushreebasics

Description

@Anushreebasics

Describe the problem

On the Checkstyle website, headings display an anchor/link icon next to them. However, clicking this icon does not copy the section’s direct URL to the clipboard, which makes it inconvenient to share or reference a specific section of the documentation.
In many modern documentation websites (e.g., GitHub Docs, MDN), clicking the heading link icon copies the full URL (including the anchor) to the clipboard automatically. Users expect similar behavior here.

Expected behavior

Clicking the heading link icon should copy the full URL with the anchor (e.g., https://checkstyle.org/...#section-name) to the clipboard.
Ideally, the user should receive a subtle visual confirmation (e.g., tooltip like “Link copied”).

Actual behavior

The link icon does not copy anything to the clipboard.
Users must manually right-click or reconstruct the URL to share a specific section.

Why this improvement is useful

Improves usability and documentation sharing
Aligns Checkstyle docs behavior with common documentation UX patterns
Particularly helpful when referencing specific rules or configuration sections in issues, reviews, or discussions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions