Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the value attribute on a form input field is not announced by NVDA #1845

Closed
nvaccessAuto opened this issue Oct 17, 2011 · 5 comments

Comments

@nvaccessAuto
Copy link

Reported by bgaraventa on 2011-10-17 05:31
When JavaScript is used to dynamically change the value attribute on a form field.
E.G.
document.getElementById('textField').value = 'NewValue';
The new value is not announced by NVDA.
An example of this issue is demonstrated at
http://whatsock.com/modules/auto_suggestion_search_field_module/demo.htm
Which uses the Up and Down arrow keys to dynamically change between selected values.

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2011-10-17 05:48
I understand what you're attemping to do. Unfortunately, announcing value changes isn't possible. If we did this, every time the user typed a character, the entire value of the field would be spoken, as that causes a value change. Also, it wouldn';t quite have the effect you intend, since pressing the cursor keys in NVDA reads the line to which the cursor has moved. For a single line text field, this will always be the current line.

Are you changing the value immediately upon receiving the key press? I would have thought this would mean that NVDA's cursor code would read the changed value. If it isn't, that suggests that the value is changing after the browser processes the key.

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2011-10-17 06:02
This seems to work correctly for me in IE 8. Obviously, the value changes before NVDA reads the new line in IE 8.

In Firefox, NVDA does say "blank", but it then announces the new selection; e.g. "selected Australia". This isn't quite so nice, but still "works".

What results are you seeing? What browsers did you test with?

@nvaccessAuto
Copy link
Author

Comment 3 by bgaraventa on 2011-10-17 06:40
I apologize for not specifying, yes, it does appear to work correctly in IE. It was the extra "blank" I was trying to find a way of correcting when using Firefox. I'm not sure why it would be doing that.

This is what is happening. The script uses onKeyUp to determine when either the Up or Down arrow key is pressed, then the value changes accordingly. After the value changes, "select()" is invoked to select the text within the text field. This is the only way I could get NVDA to announce the text at all in Firefox. I'm just not sure why the difference in functionality would be so pronounced between IE and Firefox.

Do you have any ideas why "blank" is announced in Firefox, but not in IE?

@ehollig
Copy link
Collaborator

ehollig commented Jul 24, 2017

Unfortunately, it appears that the link provided gives me a "406 Not Acceptable" error. Can anyone confirm if this issue appears in the latest Firefox with the latest NVDA? As @jcsteh said it works correctly in IE 8 from #1845 (comment), I would hope that the same results would occur in IE 11.

@ehollig
Copy link
Collaborator

ehollig commented Oct 24, 2017

Closing as worksforme as reported in #1845 (comment). Unfortunately, I am unable to test this myself, as stated in #1845 (comment), the link is unavailable. If anyone can still reproduce this issue and provide a working example, we can reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants