react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Issues for Accessibilty and adding FontAwesome icon in Error Messages

Open roopa-rauniyar-roostify opened this issue 6 years ago • 2 comments

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"

roopa-rauniyar-roostify avatar Oct 10 '19 09:10 roopa-rauniyar-roostify

@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.

KKS1 avatar Oct 31 '19 05:10 KKS1

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

epicfaace avatar Nov 29 '19 03:11 epicfaace