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

feat: 一括選択のチェックボックスに可視のラベルを追加 #4149

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

masuP9
Copy link
Contributor

@masuP9 masuP9 commented Dec 27, 2023

Overview

<Table> のヘッダーセルにあるチェックボックスには、マシンリーダブルなラベルはあるが可視のラベルがなかったため追加。

参考: フォーム: ウェブアクセシビリティ簡易チェックリスト | アクセシビリティ | SmartHR Design System

入力する内容や、操作がラベルとして表示されている

What I did

テキストラベルを表示するスペースがセル内に無いため、マウスポインターがホバーした際、またはフォーカスした際に、「すべての行を選択」のツールチップを出した。

ツールチップのスクリーンショット。チェックボックスの右側に「すべての行を選択」と書かれた吹き出しが表示されている。

ヘッダーセルを固定した際に、<Table> コンポーネントの描画範囲外が描画されなくなるため、ツールチップは右側に出した。(右側の見出しセルが見えなくなるけど。。。)

その他

<ThCheckbox><th> でレンダリングされ、内包するコンテンツが「すべての行を選択」になるので、チェックボックスがあるカラムの名前が「すべての行を選択」になってしまう。

そのことを回避するために <th>aria-label を付与し、内包するコンテンツを無視して「選択」というカラム名に変更した。

Copy link

netlify bot commented Dec 27, 2023

Deploy Preview for smarthr-ui ready!

Name Link
🔨 Latest commit 7c373bf
🔍 Latest deploy log https://app.netlify.com/sites/smarthr-ui/deploys/658d140a9ec5550008aa3c94
😎 Deploy Preview https://deploy-preview-4149--smarthr-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@masuP9 masuP9 force-pushed the feat/table-header-input-label branch from 52bf4f7 to 28909fe Compare December 28, 2023 05:37
@masuP9 masuP9 changed the title Feat/table header input label feat: 一括選択のチェックボックスに可視のラベルを追加 Dec 28, 2023
@masuP9 masuP9 force-pushed the feat/table-header-input-label branch 2 times, most recently from 1664c1a to 7c373bf Compare December 28, 2023 06:22
@masuP9 masuP9 force-pushed the feat/table-header-input-label branch from 7c373bf to 46ec2c2 Compare May 9, 2024 08:28
@masuP9 masuP9 force-pushed the feat/table-header-input-label branch from 46ec2c2 to 776d1fd Compare May 9, 2024 08:52
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.

1 participant