Nvda: NVDA does not read error messages referenced with aria-errormessage and aria-invalid

Created on 21 May 2018  Â·  9Comments  Â·  Source: nvaccess/nvda

Steps to reproduce:

In any browser (Firefox/Chrome):

  1. Head on over to my aria-errormessage code pen
  2. Enter a number that is 12 or less and click the "Test it" button.
  3. (optionally) you can move focus away from and back to the input field.

In the code aria-invalid gets set to true on the input and the error message is displayed (it is already connected using aria-errormessage).

Expected behavior:

When aria-invalid is set to true on a form field the screen reader should read any error message id referenced from the input field using aria-errormessage.

NVDA would read the error message after the label and value of the form field (similar to how it would be if it were referenced with aria-describedby), possibly adding a word like "error message" or "error".

Actual behavior:

NVDA does not read the error message when the invalid input is focused.

System configuration:

NVDA version: 2018.1
(with IE11, Chrome 65 and Firefox 52-ESR), was not able to test on latest Firefox build.

NVDA Installed or portable:
Installed

Other information:

Windows version:

Windows 7 and 8 tested.

Name and version of other software in use when reproducing the issue:

Tested with the major browsers on Windows (see above).

Other questions:

N/A.

ARIA feature

Most helpful comment

I don't really care about the issue number, but I do care that we
settle on a solution and hope the good people at NVDA can find time to
implement it (I know it takes time and I totally respect that).
We want to use aria-errormessage so that we can hardcode the error
association in the template and then activate it by setting
aria-invalid to true on the field when it is in error.
This can't be done with aria-describedby because the contents of its
target are read regardless of visibility (in other words, a hidden
error message referenced with aria-described by is always announced).
But until aria-errormessage has better support we can't implement this solution.

On 7/17/18, David MacDonald notifications@github.com wrote:

Seems we have a circle here: #7768 references #8318, and #8318, reference

  1. They both say it's better handled in the other.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/nvaccess/nvda/issues/8318#issuecomment-405618407

--
Work hard. Have fun. Make history.

All 9 comments

When a number <= 12 is typed and and “test it” button is activated, focus returns to the field and “invalid entry” is announced along with the number that was input. What exact behavior would you want to see here?

NVDA should also read the error message that is displayed below the
field "the number you typed is not greater than 12".
The invalid announcement comes from use of aria-invalid, but I don't
see the aria-errormessage attribute being communicated.

The error message referenced with aria-errormessage could be read
automatically or there should be a shortcut key to read the error
message on demand with focus on the input field.

On 5/21/18, PratikP1 notifications@github.com wrote:

When a number <= 12 is typed and and “test it” button is activated, focus
returns to the field and “invalid entry” is announced along with the number
that was input. What exact behavior would you want to see here?

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/nvaccess/nvda/issues/8318#issuecomment-390775754

--
Work hard. Have fun. Make history.

Perhaps @MichaelDCurran can respond here. Does NVDA support aria-errormessage yet? I don’t recall that it does.

Possible duplicate of #7768, but I think this one is better, as it gave @PratikP1 a working example, and is more in depth.

Seems we have a circle here: #7768 references #8318, and #8318, reference 7768. They both say it's better handled in the other.

I don't really care about the issue number, but I do care that we
settle on a solution and hope the good people at NVDA can find time to
implement it (I know it takes time and I totally respect that).
We want to use aria-errormessage so that we can hardcode the error
association in the template and then activate it by setting
aria-invalid to true on the field when it is in error.
This can't be done with aria-describedby because the contents of its
target are read regardless of visibility (in other words, a hidden
error message referenced with aria-described by is always announced).
But until aria-errormessage has better support we can't implement this solution.

On 7/17/18, David MacDonald notifications@github.com wrote:

Seems we have a circle here: #7768 references #8318, and #8318, reference

  1. They both say it's better handled in the other.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/nvaccess/nvda/issues/8318#issuecomment-405618407

--
Work hard. Have fun. Make history.

I can still reproduce this issue in NVDA 2019.1.1 on Firefox 66.0.4 and Chrome 74.
cc: @feerrenrut

Still reproducible in Firefox 76.0.1 and Chrome 81. cc: @jcsteh, @aleventhal maybe you have some suggestions here, I think many authors implement aria-errormessage like this but I am not sure if this violates the Aria spec.

Firefox correctly exposes aria-errormessage using IA2_RELATION_ERROR. NVDA just doesn't support this yet.

Was this page helpful?
0 / 5 - 0 ratings