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

NVDA does not read error messages referenced with aria-errormessage and aria-invalid #8318

Closed
Wildebrew opened this issue May 21, 2018 · 20 comments · Fixed by #16411
Closed
Assignees
Labels
ARIA feature GoogleWork p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@Wildebrew
Copy link

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.

@PratikP1
Copy link

PratikP1 commented May 21, 2018 via email

@Wildebrew
Copy link
Author

Wildebrew commented May 21, 2018 via email

@PratikP1
Copy link

PratikP1 commented May 21, 2018 via email

@aosheter
Copy link

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

@DavidMacDonald
Copy link

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

@Wildebrew
Copy link
Author

Wildebrew commented Jul 18, 2018 via email

@Adriani90
Copy link
Collaborator

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

@Adriani90
Copy link
Collaborator

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.

@jcsteh
Copy link
Contributor

jcsteh commented May 11, 2020

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

@Anubarak
Copy link

I faced this issue today too and I tought it was due to my wrong code.
Can someone suggest a reader that supports it so I can test my HTML?
@Wildebrew Thanks for your example

@woody-li
Copy link

Looking forward for this feature.

@Miguelklappes
Copy link

Hope it gets implemented.

@aleventhal
Copy link

Similar to what James Teh mentioned, I don't believe this requires anything on the Chrome side. Chrome implements aria-errormessage and aria-invalid via the CORE-AAM spec, e.g. relations IA2_RELATION_ERROR and IA2_RELATION_ERROR_FOR.

@seanbudd seanbudd added this to the 2022.1 milestone Sep 2, 2021
@seanbudd seanbudd removed this from the 2022.1 milestone Jan 31, 2022
@james-hill-kc
Copy link

This still appears to be an issue as of May 23rd 2022, is a fix expected any time soon?

@seanbudd seanbudd added triaged Has been triaged, issue is waiting for implementation. p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels May 24, 2022
@timveld
Copy link

timveld commented Oct 20, 2022

+1 for prioritizing this. JAWS supports aria-errormessage and reads it very nicely, NVDA doesn't. Even though NVDA is the primary screen reader for which we optimize our application, that doesn't mean we can ignore the aria specification (which for good reasons recommends the use of aria-errormessage rather than aria-describedby in this situation).

@feerrenrut
Copy link
Contributor

Technical notes to aide anyone willing to take this on:

Look at other fetched relations:

  • Expose the value from the virtual buffer (nvdaHelper C++ code) look at usages of getRelationId.
    • In this case, the relations to look for are IA2_RELATION_ERROR, IA2_RELATION_ERROR_FOR
  • Other examples to follow: IA2_RELATION_DETAILS / IA2_RELATION_LABELLED_BY
    • On the python side, look at def hasDetails, def _get_detailsSummary work / are used.

In this case, it is probably most user friendly to report the error automatically. However, it should be noted that when the error is displayed and exposed to AT there is the risk of reporting the error twice. To remedy these situations, look at how "labelledByContent" works.

@onzag
Copy link

onzag commented Nov 13, 2022

Is this not yet fixed?... I am currently using orca for development reasons and I did not expect that the same issue was to be found in NVDA, can I use described-by instead?...

@Wildebrew
Copy link
Author

This is still not fixed (tested with NVDA 2023.1 on latest versions of both Chrome and Firefox.
Does the team have any update?

@Adriani90
Copy link
Collaborator

@seanbudd, @gerald-hartig it seems the demand for this from several web developers is quite high even though there is also a discussion on deprecating this role. I think it makes sense to implement support for this in NVDA given this role has already been used in the design of several websites or applications.
At the same time, there are also several bugs in NvDA with regards to aria role alert which is also used to announce error messages.
So to give the user the highest level of accessibility, both alert and errormessage roles should be fully supported in NVDA.

Can you estimate how much effort it would mean to solve this issue at least?

@gerald-hartig
Copy link
Collaborator

gerald-hartig commented Jan 31, 2024

@Adriani90 we've recently started a push to improve our ARIA compatibility. This issue is right at the top of our list to resolve, and we have a specific release in mind for resolution of this one, but I'd like to hold off a bit before making any firm statements around timing. Are there any ARIA issues apart from this one you think we need to tackle as an immediate priority?

@SaschaCowley SaschaCowley self-assigned this Feb 21, 2024
seanbudd pushed a commit that referenced this issue May 8, 2024
Closes #8318

Summary of the issue:
Currently, NVDA does not read error messages referenced with aria-errormessage and aria-invalid (or platform native invalid).

Description of user facing changes
Error messages referenced by aria-errormessage are reported in speech and Braille on nodes marked as invalid.

Description of development approach
NVDAObjects have a new property, errorMessage, which is retrieved via the error IA2 relation. For virtual buffers, this is done in the virtual buffer backend and stored in the virtual buffer node. For focus mode, this is done at call-time.
@nvaccessAuto nvaccessAuto added this to the 2024.3 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARIA feature GoogleWork p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.