mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 13:03:04 +00:00
Fix minor accessibility issue in Search results grid view. No accessible test found for link. Moved text to i18n as well.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="card">
|
||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top">
|
||||
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="card-img-top" [attr.title]="'search.results.view-result' | translate">
|
||||
<ds-thumbnail [thumbnail]="(object.logo | async)?.payload" [limitWidth]="false">
|
||||
</ds-thumbnail>
|
||||
</a>
|
||||
@@ -11,7 +11,7 @@
|
||||
<h4 class="card-title">{{object.name}}</h4>
|
||||
<p *ngIf="object.shortDescription" class="card-text">{{object.shortDescription}}</p>
|
||||
<div *ngIf="linkType != linkTypes.None" class="text-center">
|
||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">View</a>
|
||||
<a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/collections/', object.id]" class="lead btn btn-primary viewButton">{{ 'search.results.view-result' | translate}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -4,6 +4,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
let collectionGridElementComponent: CollectionGridElementComponent;
|
||||
let fixture: ComponentFixture<CollectionGridElementComponent>;
|
||||
@@ -37,6 +38,9 @@ const linkService = jasmine.createSpyObj('linkService', {
|
||||
describe('CollectionGridElementComponent', () => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
TranslateModule.forRoot()
|
||||
],
|
||||
declarations: [CollectionGridElementComponent],
|
||||
providers: [
|
||||
{ provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) },
|
||||
|
Reference in New Issue
Block a user