adobe / adobe/aem-core-wcm-components

[Link] Showing file types in links

Open
#2,899 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
796
Forks
776
Avg merge
3d 22h
Merged PRs (30d)
8

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**
`My file (Fr - 153 Mo – PDF) `

**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**
- WCAG 3.2 : https://www.w3.org/TR/WCAG21/#predictable
- WCAG H30 https://www.w3.org/TR/WCAG20-TECHS/H30.html
- https://adrianroselli.com/2019/12/showing-file-types-in-links.html

Contributor guide

Open the contributing guide

Research direction

Start by locating the link-rendering entry points in the AEM Core Components repository and reviewing how downloadable and external files are identified, including available DAM metadata. Done means download links expose the relevant language, size, and format in their visible label and title where applicable, while following the WCAG references in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, java
Domain
accessibility, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.