-
Notifications
You must be signed in to change notification settings - Fork 148
feat!: FocusIndicator を inset にしつつ outline を使用する方法に変更する #5917
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
base: master
Are you sure you want to change the base?
Conversation
commit: |
f0f3b34 to
e615dca
Compare
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.
CI が落ちてる理由がわからず lint --write 系でwarningも修正したため関係ない変更が多くなってしまいました 🙇
|
通常のフォーカスインジケーターも |
| boxShadow: `0 0 0 2px ${theme('colors.white')}`, | ||
|
|
||
| /** overflow する可能性がある場合はフォーカスインジケーターを内側に設定する */ | ||
| '.overflow-hidden &, .overflow-y-hidden &, .overflow-x-hidden &, .overflow-y-clip &, .overflow-x-clip &, .overflow-y-auto &, .overflow-x-auto &': |
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.
dialog系がまずい
関連URL
https://smarthr.atlassian.net/browse/A11Y2-68
https://smarthr.atlassian.net/browse/A11Y2-47
概要
やりたいこと
box-shadowではなくoutlineを使用してフォーカスインジケーターを作りたい変更内容
createOutline.tsを作成し、createShadow.tsから削除smarthr-ui-presets.tsのfocus-indicatorに、祖先にoverflowがいる場合は内側になるように処理を追加:whereで詳細度を 0 に変化があったもの↓
※ WarekiPicker の年を選ぶカレンダーは元のフォーカスインジケーターが hover などと違っていて違和感があったので一緒に変更を入れました
inset にしている条件が、「祖先に
offset-*が当たっているかどうか 」で判定しているため、ほとんどの要素が inset になる可能性があります。また、ダイアログあり/なしで同じ要素だけどfocusの当たり方が変わるといった可能性があります。
そのため、基本insetにしつつ、insetであるとわかりにくくなる一部の要素だけouterにするという実装を考えています。
確認方法