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:
Tim Donohue
2023-09-01 09:48:17 -05:00
committed by github-actions[bot]
parent e9efb50e02
commit 07b95c2634
3 changed files with 6 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
{{model.placeholder}} <span *ngIf="model.required">*</span>
</legend>
<ds-number-picker
tabindex="1"
tabindex="0"
[id]="model.id + '_year'"
[disabled]="model.disabled"
[min]="minYear"
@@ -21,7 +21,7 @@
></ds-number-picker>
<ds-number-picker
tabindex="2"
tabindex="0"
[id]="model.id + '_month'"
[min]="minMonth"
[max]="maxMonth"
@@ -37,7 +37,7 @@
></ds-number-picker>
<ds-number-picker
tabindex="3"
tabindex="0"
[id]="model.id + '_day'"
[min]="minDay"
[max]="maxDay"

View File

@@ -6,7 +6,7 @@
[disabled]="disabled"
(click)="toggleUp()">
<span class="chevron"></span>
<span class="sr-only">Increment</span>
<span class="sr-only">Increment {{placeholder}}</span>
</button>
<input
id="{{id}}"
@@ -24,6 +24,7 @@
[disabled]="disabled"
[ngClass]="{'is-invalid': invalid}"
title="{{placeholder}}"
[attr.aria-label]="placeholder"
>
<button
class="btn btn-link-focus"
@@ -32,6 +33,6 @@
[disabled]="disabled"
(click)="toggleDown()">
<span class="chevron bottom"></span>
<span class="sr-only">Decrement</span>
<span class="sr-only">Decrement {{placeholder}}</span>
</button>
</div>

View File

@@ -42,7 +42,6 @@ describe('NumberPickerComponent test suite', () => {
beforeEach(() => {
html = `
<ds-number-picker
tabindex="1"
[disabled]="disabled"
[min]="min"
[max]="max"