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

Add classes to the default FieldView #36

Open
galhavivi opened this issue Feb 23, 2020 · 0 comments
Open

Add classes to the default FieldView #36

galhavivi opened this issue Feb 23, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@galhavivi
Copy link
Member

We should add classes to the default FieldView (in react-form) to indicate fields statues.

Question to figure before implementing:
should we use aria- instead? And is all the alternative aria-* relevant for non input elements such a container div? is there a better way to describe this on the DOM?

To the root div of the field

  • jafar-field (always exists)
  • jafar-required (only if required=true)
  • jafar-empty (only if empty=true)
  • jafar-disabled (only if disabled=true)
  • jafar-invalid (only if invalid=true)
  • jafar-dirty (only if dirty=true)

To the div that wraps the component

  • jafar-component

To the div that wraps the error

  • jafar-error

To the header

  • jafar-header

To the div that wraps the label

  • jafar-label

To the div that wraps the description

  • jafar-description

To the div that wraps the asterisk of the required

  • jafar-required-indicator
@galhavivi galhavivi added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant