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 <root@TI-03.OHB.LOCAL>
This commit is contained in:
Andrea-Guevara
2024-12-18 17:18:24 -03:00
committed by Tim Donohue
parent 2ff5350302
commit 4bf4e18389
5 changed files with 15 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
<a [routerLink]="(bitstreamPath$| async)?.routerLink" class="dont-break-out" [queryParams]="(bitstreamPath$| async)?.queryParams" [target]="isBlank ? '_blank': '_self'" [ngClass]="cssClasses">
<a [routerLink]="(bitstreamPath$| async)?.routerLink" class="dont-break-out"
[queryParams]="(bitstreamPath$| async)?.queryParams"
[target]="isBlank ? '_blank': '_self'"
[ngClass]="cssClasses"
[attr.aria-label]="('file-download-link.download' | translate) + dsoNameService.getName(bitstream)">
<span *ngIf="!(canDownload$ |async)" [attr.aria-label]="'file-download-link.restricted' | translate" class="pr-1"><i class="fas fa-lock"></i></span>
<ng-container *ngTemplateOutlet="content"></ng-container>
</a>

View File

@@ -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,
) {
}

View File

@@ -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",

View File

@@ -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",
}

View File

@@ -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",