Skip to content

Commit 79248a5

Browse files
authored
Merge pull request #845 from bcgov/dss-907-frontend-accessibility
dss-907 front end accessibility fixes includes dss-704,705,706
2 parents 352fffb + 3f7ad24 commit 79248a5

File tree

7 files changed

+27
-21
lines changed

7 files changed

+27
-21
lines changed

frontend/src/app/common/layout/layout.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1 class="main-title">Short-Term Rental Data Portal</h1>
2525
<div class="content" role="main">
2626
<router-outlet />
2727
</div>
28-
<div class="footer do-not-print-it" role="footerinfo">
28+
<div class="footer do-not-print-it" role="contentinfo">
2929
<div class="cc">© 2024 Government of British Columbia.</div>
3030
</div>
3131

frontend/src/app/features/components/bulk-compliance-notice/bulk-compliance-notice.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ <h4>All fields are required except where stated.</h4>
1313
styleClass="p-datatable-sm" [(selection)]="selectedListings">
1414
<ng-template pTemplate="header">
1515
<tr>
16-
<th style="width: 4rem">
17-
<p-tableHeaderCheckbox></p-tableHeaderCheckbox>
16+
<th style="width: 4rem" aria-labelledby="selectAll_checkbox_header">
17+
<p-tableHeaderCheckbox id="selectAll_checkbox_header"
18+
ariaLabel="'Select or Deselect All'"></p-tableHeaderCheckbox>
1819
</th>
1920
<th class="sortable-header" id="offeringOrganizationNm_header"
2021
[class.sorted]="this.sort && this.sort.prop === 'offeringOrganizationNm'"
@@ -68,7 +69,7 @@ <h4>All fields are required except where stated.</h4>
6869
<ng-template pTemplate="body" let-listing>
6970
<tr class="small-text">
7071
<td>
71-
<p-tableCheckbox [value]="listing"></p-tableCheckbox>
72+
<p-tableCheckbox [value]="listing" ariaLabel="'Include Listing'"></p-tableCheckbox>
7273
</td>
7374
<td>{{ listing.offeringOrganizationNm }}</td>
7475
<td>
@@ -78,7 +79,8 @@ <h4>All fields are required except where stated.</h4>
7879
</td>
7980
<td>
8081
<p-checkbox [disabled]="!listing.hasAtLeastOneValidHostEmail"
81-
[(ngModel)]="listing.sendNoticeToHosts" [binary]="true" inputId="binary"></p-checkbox>
82+
[(ngModel)]="listing.sendNoticeToHosts" [binary]="true" inputId="binary"
83+
ariaLabel="Send notice to hosts"></p-checkbox>
8284
</td>
8385
<td [class.no-email]="!listing.hasAtLeastOneValidHostEmail">{{ !listing.hasAtLeastOneValidHostEmail?
8486
'Yes':'No' }}</td>

frontend/src/app/features/components/bulk-takedown-request/bulk-takedown-request.component.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ <h4>Takedown Requests for each platform are aggregated into a CSV file and sent
1616
styleClass="p-datatable-sm" [(selection)]="selectedListings">
1717
<ng-template pTemplate="header">
1818
<tr>
19-
<th style="width: 4rem">
20-
<p-tableHeaderCheckbox></p-tableHeaderCheckbox>
19+
<th style="width: 4rem" aria-labelledby="selectAll_checkbox_header">
20+
<p-tableHeaderCheckbox id="selectAll_checkbox_header"
21+
ariaLabel="'Select or Deselect All'"></p-tableHeaderCheckbox>
2122
</th>
2223
<th class="sortable-header" id="status_header"
2324
[class.sorted]="this.sort && this.sort.prop === 'offeringOrganizationNm'"
@@ -60,7 +61,7 @@ <h4>Takedown Requests for each platform are aggregated into a CSV file and sent
6061
<ng-template pTemplate="body" let-listing>
6162
<tr class="small-text">
6263
<td>
63-
<p-tableCheckbox [value]="listing"></p-tableCheckbox>
64+
<p-tableCheckbox [value]="listing" ariaLabel="'Include Listing'"></p-tableCheckbox>
6465
</td>
6566
<td>{{ listing.offeringOrganizationNm }}</td>
6667
<td>

frontend/src/app/features/components/delisting-request/delisting-request.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h4>Add Details of your request</h4>
7777
<div class="form-group-row-col has-checkbox">
7878
<p-checkbox formControlName="isWithStandardDetail" [binary]="true" id="isWithStandardDetail"
7979
name="isWithStandardDetail" inputId="isWithStandardDetailInput"
80-
(onChange)="onWithStandardDetailChanged($event)"></p-checkbox>
80+
(onChange)="onWithStandardDetailChanged($event)" ariaLabel="Include standard detail"></p-checkbox>
8181
<label for="isWithStandardDetail">Remove the listing from platform, do not allow transactions for payments
8282
associated with the listing, and cancel all bookings associated with the listing.</label>
8383
</div>

frontend/src/app/features/components/listings-table/aggregated-listings-table/aggregated-listings-table.component.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ <h2 class="title">Aggregated Listings</h2>
55
<p-dropdown [options]="searchColumns" [showClear]="searchColumn !== 'all'" (onClear)="clearSearchBy($event)"
66
id="search-by-drd" [(ngModel)]="searchColumn" class="search-by-select"></p-dropdown>
77
<span class="p-input-icon-right search-input-container">
8-
<button pButton class="search-submit-btn" id="search-submit-btn" (click)="onSearch()"> <i
9-
class="pi pi-search"></i></button>
8+
<button pButton class="search-submit-btn" id="search-submit-btn" (click)="onSearch()" aria-label="Search">
9+
<i class="pi pi-search"></i></button>
1010
<button pButton *ngIf="!!searchTerm" id="clear-search-btn" class="colorless p-button-link search-clear-btn"
11-
icon="pi pi-times" (click)="onClearSearchBox()"></button>
11+
icon="pi pi-times" (click)="onClearSearchBox()" aria-label="Clear search"></button>
1212
<input type="text" id="search-term-inp" (keydown.enter)="onSearch()" class="search-input"
13-
placeholder="Search" pInputText [(ngModel)]="searchTerm" />
13+
placeholder="Search" pInputText [(ngModel)]="searchTerm" aria-label="Search input" />
1414
</span>
1515
<button pButton id="filter-open-btn" class="filter-open-btn p-button-link" [class.colorless]="!isFilterSet"
1616
icon="pi {{isFilterSet?'pi-filter-fill':'pi-filter'}}" (click)="openFilterSidebar()">
@@ -48,7 +48,7 @@ <h2 class="title">Aggregated Listings</h2>
4848
<div class="rows-info-wrapper">
4949
<span class="panel-header-small" [style.visibility]="listingsSelected ? 'visible' : 'hidden'">Selected
5050
{{listingsSelected}} items. <button pButton class="p-button-link zero-padding small-text"
51-
(click)="unselectAll()">Unselect All</button>
51+
(click)="unselectAll()" aria-label="Unselect all items in the table">Unselect All</button>
5252
</span>
5353
<span class="panel-header-small" *ngIf="currentPage">Showing {{ currentPage.itemCount}} of
5454
{{currentPage.totalCount || 0}} listings</span>
@@ -103,7 +103,7 @@ <h2 class="title">Aggregated Listings</h2>
103103
<tr>
104104
<td>
105105
<button pButton id="expand-listing-row-{{index}}" class="p-button-transparent round-42"
106-
[pRowToggler]="row">
106+
[pRowToggler]="row" aria-label="Expand or Collapse Listing">
107107
<i class="pi" [ngClass]="expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'"></i>
108108
</button>
109109
</td>
@@ -142,9 +142,10 @@ <h2 class="title">Aggregated Listings</h2>
142142
<p-table [value]="row.listings" dataKey="rentalListingId">
143143
<ng-template pTemplate="header" let-listing>
144144
<tr>
145-
<th>
145+
<th [ariaLabel]="'select-listing'">
146146
<p-checkbox [(ngModel)]="row.selected" [inputId]="'group-select-chbx'" [binary]="true"
147-
(onChange)="onGroupRowSelected($event,row)"></p-checkbox>
147+
(onChange)="onGroupRowSelected($event,row)"
148+
[ariaLabel]="'Select or Deselect listing'"></p-checkbox>
148149

149150
</th>
150151
<th>Status</th>
@@ -163,7 +164,7 @@ <h2 class="title">Aggregated Listings</h2>
163164
<tr [class.filtered-out]="!listing.filtered">
164165
<td>
165166
<p-checkbox [(ngModel)]="listing.selected" [binary]="true" [inputId]="'listing-select-chbx'"
166-
(onChange)="onListingRowSelected($event,listing)"></p-checkbox>
167+
(onChange)="onListingRowSelected($event,listing)" ariaLabel="Select listing"></p-checkbox>
167168
</td>
168169
<td>
169170
<div [ngSwitch]="listing.listingStatusType" class="align-center status-col">
@@ -243,7 +244,8 @@ <h2 class="title">Aggregated Listings</h2>
243244
[rows]="currentPage.pageSize || 25" [totalRecords]="currentPage.totalCount || 0" [showCurrentPageReport]="true"
244245
[showJumpToPageInput]="true" [showPageLinks]="true" [showFirstLastIcon]="true"
245246
[rowsPerPageOptions]="[10, 25, 50, 100]"
246-
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'"></p-paginator>
247+
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'">
248+
</p-paginator>
247249
</p-panel>
248250

249251
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" [style]="{width: '50vw'}">

frontend/src/app/features/components/listings-table/listing-details/listing-details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ <h2>Detailed Listing Information for</h2>
100100
*ngIf="listing.matchScoreAmt<=addressWarningScoreLimit && (!listing.isMatchVerified && !listing.isMatchCorrected)"></i>
101101
</span>
102102
<span *ngIf="canUserEditAddress" class="change-address-button-container">
103-
<button pButton class="p-button-transparent" pTooltip="Edit Address"
103+
<button pButton class="p-button-transparent" pTooltip="Edit Address" aria-label="Edit Address"
104104
(click)="onAddressChangeClicked()">
105105
<span class="edit-address-icon"></span>
106106
</button>

frontend/src/app/features/components/listings-table/listings-table.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ <h2 class="title">Listings</h2>
233233
[currentPageReportTemplate]="'Rows per page: {rows} &nbsp; {first}-{last} of {totalRecords}'"></p-paginator>
234234
</p-panel>
235235

236-
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" [style]="{width: '50vw'}">
236+
<p-dialog header="Legend" [modal]="true" [(visible)]="isLegendShown" ess [style]="{width: '50vw'}"
237+
[closeOnEscape]="true">
237238
<span>
238239
<strong>Status:</strong> Status of the listing using the following categories:
239240
<ul class="statuses">

0 commit comments

Comments
 (0)