Skip to content
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

fix: Buttonをloading状態に切り替えるとフォーカスが外れてしまう問題の修正 #4684

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

misako0927
Copy link
Contributor

Related URL

https://smarthr.atlassian.net/browse/SHRUI-952

Overview

aria-disabledを使用することでフォーカスが外れないようにした

What I did

  • aria-disabledを使用した
  • aria-disabledの際に非活性スタイルが当たるようにした
  • aria-disabledの際にclickしても反応しないようにした

Capture

@misako0927 misako0927 changed the title Buttonをloading状態に切り替えるとフォーカスが外れてしまう問題の修正 fix: Buttonをloading状態に切り替えるとフォーカスが外れてしまう問題の修正 May 30, 2024
@misako0927 misako0927 marked this pull request as ready for review June 14, 2024 00:39
@misako0927 misako0927 requested a review from a team as a code owner June 14, 2024 00:39
@misako0927 misako0927 requested review from Tokky0425 and atzzCokeK and removed request for a team June 14, 2024 00:39
Copy link
Contributor

@s-sasaki-0529 s-sasaki-0529 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 変更内容を確認し、手元でフォーカス移動やホバー・クリック時の挙動、ハイコントラストモードでの見え方あたりを確認できました!

Comment on lines 201 to 202
'aria-disabled:forced-colors:shr-border-[GrayText]',
'aria-disabled:forced-colors:shr-text-[GrayText]',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いずれの variants でも共通のスタイルのため、compoundSlots に書く必要はなさそうに見えました。意図的でなければ default に移動しても良さそうです。
また、なぜ必要なスタイルなのかコードからは読み取りづらいので、コメントの追記をお願いします!(UA の disabled ではないから強制カラーモードの時に色が変わらない?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提案修正 #4744

@uknmr uknmr requested a review from s-sasaki-0529 June 25, 2024 07:52

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@uknmr uknmr merged commit 945ca95 into master Jul 1, 2024
8 checks passed
@uknmr uknmr deleted the use-aria-disabled-to-button branch July 1, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants