Skip to content

[Link] Showing file types in links #2899

Open
@renow-luxembourg

Description

Feature Request

Is your feature request related to a problem? Please describe.
Users have no information about links to download files.
It confuses users when a file starts downloading without warning when they were only expecting to be redirected to another page.
In addition to this, it is also important for people to know the language, size (weight) and format of the file before downloading it (for example: people with limited data or those who do not have a PDF viewer).

Describe the solution you'd like
Add the file language, size (weight), and format in parentheses next to the file link.

  • Language if relevant (and different from current page) and if we get the information (from DAM)
  • Size (weight) if we get the information (from DAM)
  • File format for all links to download files (even for external files)

Example
<a href="/my_file.pdf" title="My file (Fr - 153 Mo – PDF) - new window">My file (Fr - 153 Mo – PDF)</a>

Are there alternatives?
An alternative can be to add images with the format and lang with a relevant alternative text or with a .sr-only class but this not work with the file size.

Documentation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions