mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Fix heading order accessibility issue in search filters/facets
(cherry picked from commit 276d80895e
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
6df76515ba
commit
63c752b3f4
@@ -19,17 +19,7 @@ describe('My DSpace page', () => {
|
|||||||
cy.get('.filter-toggle').click({ multiple: true });
|
cy.get('.filter-toggle').click({ multiple: true });
|
||||||
|
|
||||||
// Analyze <ds-my-dspace-page> for accessibility issues
|
// Analyze <ds-my-dspace-page> for accessibility issues
|
||||||
testA11y(
|
testA11y('ds-my-dspace-page');
|
||||||
{
|
|
||||||
include: ['ds-my-dspace-page'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
// Search filters fail this "moderate" impact rules
|
|
||||||
'heading-order': { enabled: false },
|
|
||||||
}
|
|
||||||
} as Options
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have a working detailed view that passes accessibility tests', () => {
|
it('should have a working detailed view that passes accessibility tests', () => {
|
||||||
|
@@ -27,17 +27,7 @@ describe('Search Page', () => {
|
|||||||
cy.get('[data-test="filter-toggle"]').click({ multiple: true });
|
cy.get('[data-test="filter-toggle"]').click({ multiple: true });
|
||||||
|
|
||||||
// Analyze <ds-search-page> for accessibility issues
|
// Analyze <ds-search-page> for accessibility issues
|
||||||
testA11y(
|
testA11y('ds-search-page');
|
||||||
{
|
|
||||||
include: ['ds-search-page'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rules: {
|
|
||||||
// Search filters fail this "moderate" impact rule
|
|
||||||
'heading-order': { enabled: false },
|
|
||||||
}
|
|
||||||
} as Options
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have a working grid view that passes accessibility tests', () => {
|
it('should have a working grid view that passes accessibility tests', () => {
|
||||||
|
@@ -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.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"
|
[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}}
|
{{'search.filters.filter.' + filter.name + '.head'| translate}}
|
||||||
</h5>
|
</h4>
|
||||||
<span class="filter-toggle flex-grow-1 fas p-auto"
|
<span class="filter-toggle flex-grow-1 fas p-auto"
|
||||||
[ngClass]="(collapsed$ | async) ? 'fa-plus' : 'fa-minus'"
|
[ngClass]="(collapsed$ | async) ? 'fa-plus' : 'fa-minus'"
|
||||||
[title]="((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate">
|
[title]="((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate">
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="setting-option mb-3 p-3">
|
<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)">
|
<select id="{{id}}" class="form-control" (change)="change.emit($event)">
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</select>
|
</select>
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
background-color: var(--bs-primary);
|
background-color: var(--bs-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
h4 {
|
||||||
font-size: 1.1rem
|
font-size: 1.1rem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user