-
Notifications
You must be signed in to change notification settings - Fork 3
[IMO] ページのアクセシビリティ補強対応 #221
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
Conversation
| return ( | ||
| <Card> | ||
| {heading} | ||
| <div role="img" aria-label={`星 5 つ中 ${integerScore} つ`}> |
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.
星 5 つ中というラベルであった時、VoiceOver の日本語読み上げだと
「ほしごつなか」と読み上げてしまうので、f9238f6 (#221) にて丁寧な言葉に対応しました。
| hashtags={['ダジャレ判定']} | ||
| className="px-4 py-2 bg-twitter text-white rounded-sm" | ||
| resetButtonStyle={false} | ||
| aria-label="結果をツイート" |
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.
<button> の中の結果をツイート文言とダブってしまうのですが、
<TwitterShareButton> では aria-label="twitter" がデフォルトになっているため
読み上げ時に何のボタンなのかが分からなくなるため、上書きする意味で変更しました。
| <label htmlFor="input-dajare" className="sr-only"> | ||
| ダジャレ入力欄 | ||
| </label> |
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> タグにはそれに紐づく <label> が必要なため
.sr-only で見た目上見えないようにして関連付けました。
https://tailwindcss.com/docs/screen-readers
ygkn
left a comment
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.
まさか PR まで出してくださるとは……!
助かります。ありがとうございます!!!
こんにちは。本日開催されていた焼肉争奪戦!NU CAMP Dev&Pub LT Party を観覧枠で聴いていたものです。
星の点数読み上げ対応をされていると聴いたときは、素晴らしい対応だなと思いました。
ソースコードの方拝見させていただいて、アクセシビリティ観点での補強として出させて頂きました。
完全に IMO (個人的な意見)なプルリクエストになりますが、もしよければ見ていただければと思います 🙏🏼