From f16015abc2e81ed2d98e9d05bd0e0362a15d8eec 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 d649c0ad4e2..aea5c4562cb 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 9b01cd799d4..3080a94bd3e 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 @@ -22,6 +22,7 @@ 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 { Bitstream } from '../../core/shared/bitstream.model'; @@ -73,6 +74,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 54d2bbd00fb..249544cbd5b 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -6752,6 +6752,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 ba2674a5f12..7ee24fd2af0 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -8134,11 +8134,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 951f9880934..1a41a28829d 100644 --- a/src/assets/i18n/pt-BR.json5 +++ b/src/assets/i18n/pt-BR.json5 @@ -10232,6 +10232,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",