Skip to content

Commit

Permalink
Revert "Sidebar Images Accessibility: Added Accessibility features to…
Browse files Browse the repository at this point in the history
… the sidebar (ushahidi#330)" (ushahidi#332)

This reverts commit 365828f.
  • Loading branch information
Ifycode authored Jun 21, 2023
1 parent bdec292 commit 2ab6818
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,11 @@
>
<mat-expansion-panel-header>
<mat-panel-title class="company-info__header">
<!-- Adding Logo at the end (thought it was more descriptive) -->
<img [src]="logo" [alt]="title + 'Logo'" class="company-info__logo" *ngIf="logo" />
<img [src]="logo" [alt]="title" class="company-info__logo" *ngIf="logo" />
<span class="company-info__title">{{ title }}</span>
<!-- The arrow down icon is an interactive icon -->
<mat-icon
svgIcon="arrow-down"
class="company-info__header__arrow"
aria-label="company description button-icon"
aria-hidden="false"
[attr.aria-expanded]="isDescriptionOpen"
role="button"
tabindex="0"
></mat-icon>
<mat-icon svgIcon="arrow-down" class="company-info__header__arrow"></mat-icon>
</mat-panel-title>
</mat-expansion-panel-header>
<!-- Ensures the div is focusable when expanded is true (added tab focus on description for screen readers to read it out to users)-->
<div [innerHTML]="description | safeUrl" [tabIndex]="isDescriptionOpen ? '0' : null"></div>

<div [innerHTML]="description | safeUrl"></div>
</mat-expansion-panel>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export class CompanyInfoComponent {
public logo: string;
public title: string;
public description: string;
// Added to keep track of the arrow down icon in the expansion panel whether it is expanded or collapsed
public expanded: boolean = false;

public isDescriptionOpen = true;

Expand All @@ -31,8 +29,6 @@ export class CompanyInfoComponent {
}

public descriptionToggleHandle(state: boolean) {
// Changes arrow down icon attr.aria-expanded to true or false
this.isDescriptionOpen = state;
localStorage.setItem('is_description_open', JSON.stringify(state));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="sidebar__logo" *ngIf="isDesktop">
<img
src="../../../../assets/images/ushahidi-logo.svg"
alt="Ushahidi Company Platform Logo"
alt="ushahidi"
width="172"
height="40"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
[iconOnly]="!(isDesktop$ | async)!"
>
<span *ngIf="isDesktop$ | async">{{ 'app.add_new_post' | translate }}</span>
<!-- Added aria-hidden true (I noticed all mat-icons in the side nav the aria-hidden is set to true in default
(or perhaps there's a configuration I missed)) -->
<mat-icon icon svgIcon="plus" aria-hidden="true"></mat-icon>
<mat-icon icon svgIcon="plus"></mat-icon>
</mzima-client-button>

0 comments on commit 2ab6818

Please sign in to comment.