Skip to content

Commit 9285938

Browse files
[UXP-178] fix accessibility
1 parent 4ed4f32 commit 9285938

6 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/app/footer/footer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h5 class="text-uppercase">Need professional help?</h5>
6565
</p>
6666
<ul class="footer-info list-unstyled small d-flex justify-content-center mb-0">
6767
<li>
68-
<a class="text-white" href="javascript:void(0);"
68+
<a role="button" class="text-white" href="javascript:void(0);"
6969
(click)="showCookieSettings()">{{ 'footer.link.cookies' | translate}}</a>
7070
</li>
7171
<li *ngIf="showPrivacyPolicy">

src/app/shared/carousel/carousel.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
</div>
2121
<div class="carousel-caption">
2222
<div class="carousel-caption-inner">
23-
<h3 data-test="carouselObjTitle" [class]="carouselOptions.titleStyle"
23+
<h1 data-test="carouselObjTitle" [class]="carouselOptions.titleStyle" class="h3"
2424
*ngIf="item.indexableObject.metadata[title]">
25-
{{item.indexableObject.metadata[title][0].value}}</h3>
25+
{{item.indexableObject.metadata[title][0].value}}</h1>
2626
<div data-test="carouselObjDesc" class="carousel-caption-text pr-3 pl-2" [class]="carouselOptions.captionStyle"
2727
*ngIf="item.indexableObject.metadata[description]; let descriptionObj">
2828
{{descriptionObj[0].value}}
@@ -34,7 +34,7 @@
3434
</ng-template>
3535
</ngb-carousel>
3636
<div class="text-center play-pause-button">
37-
<button type="button" class="btn btn-sm toggle-paused" (click)="togglePaused()">
37+
<button [attr.aria-label]="'carousel.play.pause' | translate" type="button" class="btn btn-sm toggle-paused" (click)="togglePaused()">
3838
<i class="fas fa-play" *ngIf="paused"></i>
3939
<i class="fas fa-pause" *ngIf="!paused"></i>
4040
</button>

src/app/shared/explore/section-component/top-section/top-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="card-header">{{ 'explore.index.' + (topSection.titleKey ? topSection.titleKey : topSection.sortField) | translate }}</div>
55
</ng-container>
66
<ng-template #listView>
7-
<h3 class="mx-2">{{ 'explore.index.' + (topSection.titleKey ? topSection.titleKey : topSection.sortField) | translate }}</h3>
7+
<h1 class="h3 mx-2">{{ 'explore.index.' + (topSection.titleKey ? topSection.titleKey : topSection.sortField) | translate }}</h1>
88
</ng-template>
99
<div [ngClass]="{'card-body': topSection.showAsCard}">
1010
<div class="row pl-2" *ngIf="topSection.showLayoutSwitch">

src/app/social/social.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="a2a" [class.d-none]="!(showOnCurrentRoute$ | async)" data-a2a-scroll-show="0,60"
1+
<div [attr.aria-label]="'social.component.title' | translate" role="dialog" id="a2a" [class.d-none]="!(showOnCurrentRoute$ | async)" data-a2a-scroll-show="0,60"
22
class="a2a_kit a2a_kit_size_32 a2a_floating_style a2a_default_style" [attr.data-a2a-title]="title" [attr.data-a2a-url]="url">
33
<a *ngFor="let button of buttonList" [class]="'a2a_button_' + button" [class.a2a_counter]="showCounters && button !== 'facebook'"></a>
44
<a *ngIf="showPlusButton" class="a2a_dd" href="https://www.addtoany.com/share"></a>

src/app/social/social.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
3+
import { TranslateModule } from '@ngx-translate/core';
44
import { SocialComponent } from './social.component';
55

66
@NgModule({
77
declarations: [
88
SocialComponent
99
],
1010
imports: [
11-
CommonModule
11+
CommonModule,
12+
TranslateModule
1213
],
1314
exports: [
1415
SocialComponent

src/assets/i18n/en.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4281,6 +4281,8 @@
42814281

42824282
"none.listelement.badge": "Item",
42834283

4284+
"no.description.available": "No description available",
4285+
42844286
"openaire.broker.title": "OpenAIRE Broker",
42854287

42864288
"openaire.broker.topics.description": "Below you can see all the topics received from the subscriptions to OpenAIRE.",
@@ -5478,6 +5480,8 @@
54785480

54795481
"search.view-switch.show-list": "Show as list",
54805482

5483+
"social.component.title": "Social Share",
5484+
54815485
"sorting.ASC": "Ascending",
54825486

54835487
"sorting.DESC": "Descending",

0 commit comments

Comments
 (0)