Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Voice over is not reading what I am typing in textbox

Below is my code:

    <form>
        <div class="form-group loginFormGrp">
            <label class="caption">Backup Cloud</label>
            <div class="custSelect loginSelect">
            <label class="caption">Server URL</label>
                <input type="text" aria-label="Server URL" name="serverUrl" class="form-control" placeholder="example.server.com" value="">
            </div>
            <div class="form-group loginFormGrp">
                <label class="caption">Email</label>
                <input type="text" aria-label="Email" name="email" class="form-control" placeholder="[email protected]" value="">
            </div>
            <div class="loginBtnRow">
                <button tabindex="0" type="submit" class="lgBtn btn btn-primary btn-block">Continue</button>
            </div>
        </div>
    </form>

whenever voiceover highlights the input text field it reads "You are currently on text field, inside web content. To enter text in this filed, type. To exit web area,.." and when I Start typing it says nothing. and checked other appilcation or websites it reads what i am typing. but in my case its not reading. Please help if anyone knows the solution.

like image 460
pareshm Avatar asked May 21 '18 09:05

pareshm


3 Answers

Add title attribute to the input element and provide additional text.

Adding aria-label to the input elements should also be picked by the screen readers.

http://pauljadam.com/demos/title-aria-label.html provides details on how different browsers and screen readers treat these attributes.

like image 192
Ramesh Avatar answered Nov 13 '22 21:11

Ramesh


Your code seems pretty fine. I tried with a chrome plugin called ChromeVox everything seems to be fine except that add the lang attribute to the parent html tag and enclose everything in a body tag some thing like this.

<html lang="en-US" style="height: 100%;">
<body>
 <form>
        <div class="form-group loginFormGrp">
            <label class="caption">Backup Cloud</label>
            <div class="custSelect loginSelect">
            <label class="caption">Server URL</label>
                <input type="text" aria-label="Server URL" name="serverUrl" class="form-control" placeholder="example.server.com" value="">
            </div>
            <div class="form-group loginFormGrp">
                <label class="caption">Email</label>
                <input type="text" aria-label="Email" name="email" class="form-control" placeholder="[email protected]" value="">
            </div>
            <div class="loginBtnRow">
                <button tabindex="0" type="submit" class="lgBtn btn btn-primary btn-block">Continue</button>
            </div>
        </div>
    </form>
</body>
</html>
like image 28
karthik Avatar answered Nov 13 '22 19:11

karthik


I'm not sure if this'll help, but You may try to update fields value attribute, every time user modify text field. Something like that:

document.querySelectorAll('input[type="text"]').forEach(function(v){
    v.addEventListener('input', function(){
        v.setAttribute('value', v.value);
    });
});

But I wish someone provide better answer, without using extra JavaScript.

like image 1
instead Avatar answered Nov 13 '22 19:11

instead