From 4bf4e18389abb26cecbef78760081b47cc4f95f4 Mon Sep 17 00:00:00 2001 From: Andrea-Guevara <101608067+Andrea-Guevara@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:18:24 -0300 Subject: [PATCH] More accessible file download link for users who use a screen reader (#3264) * More accessible file download link for users who use a screen reader * Refactoring implementation - More accessible file download link for users who use a screen reader * Fixing import error * Solving the spaces error * Solving the spaces error * Solving the spaces error in file pt-BR.json5 --------- Co-authored-by: andreaNeki --- .../file-download-link/file-download-link.component.html | 6 +++++- .../file-download-link/file-download-link.component.ts | 2 ++ src/assets/i18n/en.json5 | 2 ++ src/assets/i18n/es.json5 | 5 +++-- src/assets/i18n/pt-BR.json5 | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app/shared/file-download-link/file-download-link.component.html b/src/app/shared/file-download-link/file-download-link.component.html index 7a5729cc2da..59f255a652b 100644 --- a/src/app/shared/file-download-link/file-download-link.component.html +++ b/src/app/shared/file-download-link/file-download-link.component.html @@ -1,4 +1,8 @@ - + diff --git a/src/app/shared/file-download-link/file-download-link.component.ts b/src/app/shared/file-download-link/file-download-link.component.ts index a79a71b6340..1488401ab1c 100644 --- a/src/app/shared/file-download-link/file-download-link.component.ts +++ b/src/app/shared/file-download-link/file-download-link.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { Bitstream } from '../../core/shared/bitstream.model'; import { getBitstreamDownloadRoute, getBitstreamRequestACopyRoute } from '../../app-routing-paths'; +import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service'; import { FeatureID } from '../../core/data/feature-authorization/feature-id'; import { hasValue, isNotEmpty } from '../empty.util'; @@ -48,6 +49,7 @@ export class FileDownloadLinkComponent implements OnInit { constructor( private authorizationService: AuthorizationDataService, + public dsoNameService: DSONameService, ) { } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index a3c98f73468..a56f1cd4f2b 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -5386,6 +5386,8 @@ "browse.search-form.placeholder": "Search the repository", + "file-download-link.download": "Download ", + "register-page.registration.aria.label": "Enter your e-mail address", "forgot-email.form.aria.label": "Enter your e-mail address", diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index dfdf4ca6281..51bd9c833c8 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -7831,11 +7831,12 @@ //"browse.search-form.placeholder": "Search the repository", "browse.search-form.placeholder": "Buscar en el repositorio", + // "file-download-link.download": "Download ", + "file-download-link.download": "Descargar ", + // "register-page.registration.aria.label": "Enter your e-mail address", "register-page.registration.aria.label": "Introduzca su dirección de correo electrónico", // "forgot-email.form.aria.label": "Enter your e-mail address", "forgot-email.form.aria.label": "Introduzca su dirección de correo electrónico", - - } diff --git a/src/assets/i18n/pt-BR.json5 b/src/assets/i18n/pt-BR.json5 index eebf8968895..13a6b652a61 100644 --- a/src/assets/i18n/pt-BR.json5 +++ b/src/assets/i18n/pt-BR.json5 @@ -7858,6 +7858,9 @@ //"browse.search-form.placeholder": "Search the repository", "browse.search-form.placeholder": "Buscar no repositório", + // "file-download-link.download": "Download ", + "file-download-link.download": "Baixar ", + // "register-page.registration.aria.label": "Enter your e-mail address", "register-page.registration.aria.label": "Digite seu e-mail",