Buttonのアクセシビリティをチェック - #132
Closed
touyou wants to merge 6 commits into
Closed
Conversation
- ButtonPropsに新しい型ButtonComponentPropsを導入 - onMouseDown, onPointerDown, onTouchStartを非推奨としてマーク - アクセシビリティに関する注意喚起を追加
- DocsページでのargTypesとcontrolsのイベントハンドラを除外しました。
- ボタンコンポーネントのprefixIconとsuffixIconにaria-hidden属性を追加
- ボタンの子要素に対するXSS攻撃を防ぐテストを追加 - aria-labelに特殊文字を含む場合の処理を確認するテストを追加
- ボタンコンポーネントのサポート状況を更新し、対応状況を明確化しました。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements accessibility improvements for the Button component by deprecating down event handlers and adding proper ARIA attributes to icons.
- Deprecated
onMouseDown,onPointerDown, andonTouchStartevent handlers for accessibility compliance with WCAG pointer cancellation guidelines - Added
aria-hiddenattributes to prefix and suffix icons to improve screen reader experience - Added security-focused tests to prevent XSS vulnerabilities and handle special characters in ARIA labels
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/components/ui/button/index.tsx | Deprecated down event handlers and added aria-hidden to icons |
| src/components/ui/button/index.test.tsx | Added security tests for XSS prevention and special character handling |
| README.md | Updated Button accessibility status to complete |
| .storybook/preview.ts | Excluded deprecated event handlers from Storybook documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Member
Author
|
こっちスキルに反映して別でやってみたので閉じますね |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
概要
試しにアクセシビリティ面でチェックを入れるとしたらの一連をやってみました
変更内容
動作確認
pnpm lintを実行pnpm build:packageを実行してパッケージが正常にビルドされることを確認pnpm testを実行してテストがすべて成功することを確認関連 Issue
close goodpatch/sparkle-design-issue-archive#16