mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Fix ARIA labels and tabindex on date picker in submission form. Tabindex is unnecessary & throws accessibility errors from AXE tools
(cherry picked from commit 5dad8bec39
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
e9efb50e02
commit
07b95c2634
@@ -4,7 +4,7 @@
|
|||||||
{{model.placeholder}} <span *ngIf="model.required">*</span>
|
{{model.placeholder}} <span *ngIf="model.required">*</span>
|
||||||
</legend>
|
</legend>
|
||||||
<ds-number-picker
|
<ds-number-picker
|
||||||
tabindex="1"
|
tabindex="0"
|
||||||
[id]="model.id + '_year'"
|
[id]="model.id + '_year'"
|
||||||
[disabled]="model.disabled"
|
[disabled]="model.disabled"
|
||||||
[min]="minYear"
|
[min]="minYear"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
></ds-number-picker>
|
></ds-number-picker>
|
||||||
|
|
||||||
<ds-number-picker
|
<ds-number-picker
|
||||||
tabindex="2"
|
tabindex="0"
|
||||||
[id]="model.id + '_month'"
|
[id]="model.id + '_month'"
|
||||||
[min]="minMonth"
|
[min]="minMonth"
|
||||||
[max]="maxMonth"
|
[max]="maxMonth"
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
></ds-number-picker>
|
></ds-number-picker>
|
||||||
|
|
||||||
<ds-number-picker
|
<ds-number-picker
|
||||||
tabindex="3"
|
tabindex="0"
|
||||||
[id]="model.id + '_day'"
|
[id]="model.id + '_day'"
|
||||||
[min]="minDay"
|
[min]="minDay"
|
||||||
[max]="maxDay"
|
[max]="maxDay"
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
(click)="toggleUp()">
|
(click)="toggleUp()">
|
||||||
<span class="chevron"></span>
|
<span class="chevron"></span>
|
||||||
<span class="sr-only">Increment</span>
|
<span class="sr-only">Increment {{placeholder}}</span>
|
||||||
</button>
|
</button>
|
||||||
<input
|
<input
|
||||||
id="{{id}}"
|
id="{{id}}"
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[ngClass]="{'is-invalid': invalid}"
|
[ngClass]="{'is-invalid': invalid}"
|
||||||
title="{{placeholder}}"
|
title="{{placeholder}}"
|
||||||
|
[attr.aria-label]="placeholder"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-link-focus"
|
class="btn btn-link-focus"
|
||||||
@@ -32,6 +33,6 @@
|
|||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
(click)="toggleDown()">
|
(click)="toggleDown()">
|
||||||
<span class="chevron bottom"></span>
|
<span class="chevron bottom"></span>
|
||||||
<span class="sr-only">Decrement</span>
|
<span class="sr-only">Decrement {{placeholder}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -42,7 +42,6 @@ describe('NumberPickerComponent test suite', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
html = `
|
html = `
|
||||||
<ds-number-picker
|
<ds-number-picker
|
||||||
tabindex="1"
|
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="min"
|
[min]="min"
|
||||||
[max]="max"
|
[max]="max"
|
||||||
|
Reference in New Issue
Block a user