-
Notifications
You must be signed in to change notification settings - Fork 141
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
chore: storybookのInputのerror表示にミスがあったため調整する #4977
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromatic も差分出てなさそうですが、どのあたりにミスがあるんですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Input だけ error にすることはないにしても、コンポーネントとして error が渡ってきたときは赤枠になる挙動を残しても良いように思いました。
FormControl で aria-invalid を消し込む必要がないかもしれません。
smarthr-ui/packages/smarthr-ui/src/components/FormControl/FormControl.tsx
Lines 244 to 245 in ab62d9b
} else { | |
input.removeAttribute('aria-invalid') |
FormControlでエラー表示を正しくするためには以下の処理が必要です。
上記仕様は別の言い方をすれば
必要があります。 error propsが指定された場合、そちらを優先するならば そこまでやる必要があるかどうかが論点になりそうですね |
@Qs-F すいません!true | false 間違えていました! |
関連URL
概要
変更内容
確認方法