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: iOS系端末の場合、Select, Radio系入力要素にrequired属性を設定しないように変更 #4660

Merged
merged 3 commits into from
May 28, 2024

Conversation

AtsushiM
Copy link
Member

@AtsushiM AtsushiM commented May 20, 2024

Related URL

Overview

What I did

  • タイトルの通り、iOS系端末のブラウザ(safari, chrome, アプリ内ブラウザで確認)において、select, radioにrequired属性が設定されていると、submitの阻害は行われるがユーザーフィードバックがない、という状態になる問題を解決したい
  • そのため、iOS系端末の場合、required属性を設定しないように修正します
    • これによりフロントのvalidate自体が行われなくなりますが、そもそもhtml validate単体での実装は、実用上存在しないはずなのでこのような対応にしています
      • 歴史的経緯により、required属性を正しく認識出来ないブラウザが存在する、そもそもhtmlでの記述なのでユーザーが突破しようと思えば突破できてしまうなど、単独での実装はそもそも問題が有るため

Capture

@yagimushi yagimushi force-pushed the fix-unbind-required-attr-select-and-radio-for-ios branch from cbfcbc3 to 791a776 Compare May 20, 2024 07:30
@AtsushiM AtsushiM marked this pull request as ready for review May 20, 2024 08:05
@AtsushiM AtsushiM requested a review from a team as a code owner May 20, 2024 08:05
@AtsushiM AtsushiM requested review from yt-ymmt and Tokky0425 and removed request for a team May 20, 2024 08:05
Copy link
Contributor

@yt-ymmt yt-ymmt left a comment

Choose a reason for hiding this comment

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

実装自体はGoGoです!
細かいところをコメントしましたがnitsなのでスルーでも大丈夫です。
という意味を込めてapproveします。

packages/smarthr-ui/src/libs/ua.ts Show resolved Hide resolved
packages/smarthr-ui/src/libs/ua.ts Show resolved Hide resolved
Co-authored-by: Yuta Yamamoto <ftbae1@gmail.com>
@AtsushiM AtsushiM merged commit 9096449 into master May 28, 2024
8 checks passed
@AtsushiM AtsushiM deleted the fix-unbind-required-attr-select-and-radio-for-ios branch May 28, 2024 07:17
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

2 participants