feat(AppNaviDropdownMenuButton): 選択中の項目が視覚的にも伝わるように装飾を追加 #5193
+57
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
関連URL
https://smarthr.atlassian.net/browse/SHRUI-1180
概要
AppNaviDropdownMenuButton に current と同等の表現を付与するために
aria-current="page"
を使っています。ドロップダウンメニュー内の項目にaria-current="page"
が存在する場合に、ドロップダウントリガーを current にする、という処理になっています。aria-current="page"
が付いているため、どの項目が現在地なのか機械可読になっていますが、視覚的には伝わらない状態になっているため、これを修正します。変更内容
aria-current="page"
が付いている場合、背景色と太字の装飾が付くように修正確認方法
Storybook で確認してください。
https://63d0ccabb5d2dd29825524ab-zcokwihbgr.chromatic.com/?path=/story/navigation%EF%BC%88%E3%83%8A%E3%83%93%E3%82%B2%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%EF%BC%89-appnavi-appnavidropdownmenubutton--current