I have an input tag that contains address. I need the screen reader to read the contents of the input digit by digit and not as whole number. For this I used aria-label and the screen reader is reading it fine. But the problem is that the screen reader after reading the address digit by digit also repeats the entire address as a whole number. I need to stop this whole number repetition of the address.
Any help would be appreciated.
I've tried 2 approaches:
Approach 1:
<input #input
[type]="text"
[attr.aria-label]="processAriaLabel()"
[(ngModel)]="ariaLabel"/>
"processAriaLabel" is the method that converts the string: "12345 Von Karm" to "1 2 3 4 5 Von Karm" for the digits to be spoken separately.
In approach 1, the screen reader reads out the digits separately but also speaks the contents (numbers) as a whole number.
Approach 2:
<input #input
[type]="text"
[(ngModel)]="ariaLabel"
[attr.aria-labelledby]="hiddenLabel"
[attr.aria-hidden]="true"/>
<label id="hiddenLabel" style="position: absolute; left: -9999px;">{{processAriaLabel()}}</label>
"processAriaLabel" is the method that converts the string: "12345 Von Karm" to "1 2 3 4 5 Von Karm" for the digits to be spoken separately.
In this approach, the screen reader doesn't read the number digit-by-digit at all. Only reads it as whole number.