-
Notifications
You must be signed in to change notification settings - Fork 12
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
docs(spindle-ui): add design doc for buttonSwitch #1243
base: main
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 231d346): https://ameba-spindle--pr1243-feat-button-switch-d-1wnukbwb.web.app (expires Sat, 12 Apr 2025 08:23:15 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: e7521619a2dd5c653490c8246e81ec2a5c8f1435 |
✨✨ That's perfect, there is no visual difference! ✨✨ Check out the report here. |
</div> | ||
``` | ||
|
||
## アクセシビリティ |
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.
も加えてもよさそうに思いました。
- [ ] ボタンスイッチをラップしているdiv要素に`role="group"`、選択中のボタンに`aria-pressed="true"`を付与している | ||
- [ ] スクリーンリーダーでも機能落ちがなく、読み上げが過不足なく行われている | ||
|
||
## リンク集 |
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.
不要なら消しちゃって良いかと。
label: string; | ||
value: string; | ||
}[]; | ||
onChange: (value: string | null) => void; |
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.
onChange: (value: string | null) => void; | |
onChange: (value: string) => void; |
口頭で話した通り、利用側でNeutral化するで良さそうです 🙋♂️
<button | ||
type="button" | ||
aria-pressed="true" | ||
class="spui-ButtonSwitch--button" |
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.
class="spui-ButtonSwitch--button" | |
class="spui-ButtonSwitch-button" |
<button | ||
type="button" | ||
aria-pressed="false" | ||
class="spui-ButtonSwitch--button" |
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.
class="spui-ButtonSwitch--button" | |
class="spui-ButtonSwitch-button" |
type="button" | ||
aria-pressed="true" | ||
class="spui-ButtonSwitch--button" | ||
data-value="option1" |
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.
data-valueの使い道なければ消しても良いかも
- Surface Quaternary (ホバー時の背景色) | ||
- Surface Accent Primary (選択時の背景色) | ||
- Text High Emphasis Inverse (選択時のテキスト色) | ||
- Border Row Empasis (中央のボーダー色) |
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.
Hover追記しましょう 🙏
新規コンポーネント
ButtonSwitch
のDesign Docです。