Skip to content

Commit 63c752b

Browse files
tdonohuegithub-actions[bot]
authored andcommitted
Fix heading order accessibility issue in search filters/facets
(cherry picked from commit 276d808)
1 parent 6df7651 commit 63c752b

File tree

5 files changed

+6
-26
lines changed

5 files changed

+6
-26
lines changed

cypress/e2e/my-dspace.cy.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,7 @@ describe('My DSpace page', () => {
1919
cy.get('.filter-toggle').click({ multiple: true });
2020

2121
// Analyze <ds-my-dspace-page> for accessibility issues
22-
testA11y(
23-
{
24-
include: ['ds-my-dspace-page'],
25-
},
26-
{
27-
rules: {
28-
// Search filters fail this "moderate" impact rules
29-
'heading-order': { enabled: false },
30-
}
31-
} as Options
32-
);
22+
testA11y('ds-my-dspace-page');
3323
});
3424

3525
it('should have a working detailed view that passes accessibility tests', () => {

cypress/e2e/search-page.cy.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,7 @@ describe('Search Page', () => {
2727
cy.get('[data-test="filter-toggle"]').click({ multiple: true });
2828

2929
// Analyze <ds-search-page> for accessibility issues
30-
testA11y(
31-
{
32-
include: ['ds-search-page'],
33-
},
34-
{
35-
rules: {
36-
// Search filters fail this "moderate" impact rule
37-
'heading-order': { enabled: false },
38-
}
39-
} as Options
40-
);
30+
testA11y('ds-search-page');
4131
});
4232

4333
it('should have a working grid view that passes accessibility tests', () => {

src/app/shared/search/search-filters/search-filter/search-filter.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
[attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)"
77
[attr.data-test]="'filter-toggle' | dsBrowserOnly"
88
>
9-
<h5 class="d-inline-block mb-0">
9+
<h4 class="d-inline-block mb-0">
1010
{{'search.filters.filter.' + filter.name + '.head'| translate}}
11-
</h5>
11+
</h4>
1212
<span class="filter-toggle flex-grow-1 fas p-auto"
1313
[ngClass]="(collapsed$ | async) ? 'fa-plus' : 'fa-minus'"
1414
[title]="((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate">

src/app/shared/sidebar/sidebar-dropdown.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="setting-option mb-3 p-3">
2-
<h5><label for="{{id}}">{{label | translate}}</label></h5>
2+
<h4><label for="{{id}}">{{label | translate}}</label></h4>
33
<select id="{{id}}" class="form-control" (change)="change.emit($event)">
44
<ng-content></ng-content>
55
</select>

src/themes/dspace/styles/_global-styles.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
background-color: var(--bs-primary);
1818
}
1919

20-
h5 {
20+
h4 {
2121
font-size: 1.1rem
2222
}
2323
}

0 commit comments

Comments
 (0)