React-jsonschema-form: Issues for Accessibilty and adding FontAwesome icon in Error Messages

Created on 10 Oct 2019  路  2Comments  路  Source: rjsf-team/react-jsonschema-form

Prerequisites

Description

I Need custom messages with some fontAwesome icon in it and that error messages should be accessible to screen reader.

Steps to Reproduce

1.Generate form through react json schema.
2.Generate any error in fields.
3.Enable screen readers.

Expected behavior

Screen reader should read errors generated while blur from one field to another field if the previous focused field have error.
Need error as:
image

Html To be generated :
Screen reader does not read the error messages on blur .It reads only when someone tap on the error message.
image

As you can see the div which is highlighted grey have some aria attributes and role attribute i want to append that attribute and wrap that div to all error messages.

Actual behavior

In current Error as:
image
the HTML generated is:
image

Version

"react-jsonschema-form": "^1.7.0"

Most helpful comment

Yes, ErrorFieldTemplate is a great idea and something that it would be nice to support in rjsf.

All 2 comments

@roopa-rauniyar-roostify as we discussed, custom Field Template is the way to go for achieving this, as an interim solution. Long term, I would love to have an ErrorFieldTemplate customization exposed from react json schema forms. Let me know your thoughts @epicfaace / anyone else facing this.

Yes, ErrorFieldTemplate is a great idea and something that it would be nice to support in rjsf.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

epicfaace picture epicfaace  路  3Comments

norim13 picture norim13  路  3Comments

j-zimnowoda picture j-zimnowoda  路  3Comments

anttivikman picture anttivikman  路  3Comments

Eric24 picture Eric24  路  3Comments