Skip to content

Commit

Permalink
Fix heading order accessibility issue in search filters/facets
Browse files Browse the repository at this point in the history
(cherry picked from commit 276d808)
  • Loading branch information
tdonohue authored and github-actions[bot] committed Aug 30, 2023
1 parent 6df7651 commit 63c752b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
12 changes: 1 addition & 11 deletions cypress/e2e/my-dspace.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@ describe('My DSpace page', () => {
cy.get('.filter-toggle').click({ multiple: true });

// Analyze <ds-my-dspace-page> for accessibility issues
testA11y(
{
include: ['ds-my-dspace-page'],
},
{
rules: {
// Search filters fail this "moderate" impact rules
'heading-order': { enabled: false },
}
} as Options
);
testA11y('ds-my-dspace-page');
});

it('should have a working detailed view that passes accessibility tests', () => {
Expand Down
12 changes: 1 addition & 11 deletions cypress/e2e/search-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,7 @@ describe('Search Page', () => {
cy.get('[data-test="filter-toggle"]').click({ multiple: true });

// Analyze <ds-search-page> for accessibility issues
testA11y(
{
include: ['ds-search-page'],
},
{
rules: {
// Search filters fail this "moderate" impact rule
'heading-order': { enabled: false },
}
} as Options
);
testA11y('ds-search-page');
});

it('should have a working grid view that passes accessibility tests', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)"
[attr.data-test]="'filter-toggle' | dsBrowserOnly"
>
<h5 class="d-inline-block mb-0">
<h4 class="d-inline-block mb-0">
{{'search.filters.filter.' + filter.name + '.head'| translate}}
</h5>
</h4>
<span class="filter-toggle flex-grow-1 fas p-auto"
[ngClass]="(collapsed$ | async) ? 'fa-plus' : 'fa-minus'"
[title]="((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate">
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/sidebar/sidebar-dropdown.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="setting-option mb-3 p-3">
<h5><label for="{{id}}">{{label | translate}}</label></h5>
<h4><label for="{{id}}">{{label | translate}}</label></h4>
<select id="{{id}}" class="form-control" (change)="change.emit($event)">
<ng-content></ng-content>
</select>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/dspace/styles/_global-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
background-color: var(--bs-primary);
}

h5 {
h4 {
font-size: 1.1rem
}
}

0 comments on commit 63c752b

Please sign in to comment.