Skip to content

Conversation

shleewhite
Copy link
Contributor

@shleewhite shleewhite commented Dec 11, 2024

📌 Summary

If merged, this PR would update the select all and select row checkbox labels so the visually hidden label is always Select {selectionAriaLabelSuffix} and update the default of selectionAriaLabelSuffix to be 'row'.

It is not compliant to have the label of a form input change based on the state of the input because it makes it harder for users to find again / understand what the input is for. Instead, it is better to keep the input name consistent and let the screen reader use the html attributes on the input to convey the state (in this case, checked or unchecked).

📸 Screenshots

Before

Screenshot 2024-12-11 at 3 29 32 PM
Screenshot 2024-12-11 at 3 29 23 PM
Screenshot 2024-12-11 at 3 29 14 PM
Screenshot 2024-12-11 at 3 29 04 PM

After
Screenshot 2024-12-11 at 3 32 30 PM
Screenshot 2024-12-11 at 3 32 22 PM
Screenshot 2024-12-11 at 3 32 10 PM
Screenshot 2024-12-11 at 3 31 53 PM

🔗 External links

Jira ticket: HDS-4258


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Dec 12, 2024 2:06pm
hds-website ✅ Ready (Inspect) Visit Preview Dec 12, 2024 2:06pm

@shleewhite shleewhite marked this pull request as ready for review December 11, 2024 21:18
@shleewhite shleewhite requested a review from a team as a code owner December 11, 2024 21:18
@dchyun
Copy link
Contributor

dchyun commented Dec 12, 2024

[Question] Is this something we would want to add for 4.15?

@shleewhite
Copy link
Contributor Author

[Question] Is this something we would want to add for 4.15?

@dchyun it can go out in the next release with all of the other table/advanced table stuff

Copy link
Contributor

@KristinLBradley KristinLBradley left a comment

Choose a reason for hiding this comment

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

Nice!

@shleewhite shleewhite merged commit 5405e2a into main Dec 16, 2024
14 checks passed
@shleewhite shleewhite deleted the hds-4258/table-checkbox-label branch December 16, 2024 14:32
@hashibot-hds hashibot-hds mentioned this pull request Dec 16, 2024
@alex-ju alex-ju added this to the [email protected] milestone Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants