Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): add tests and improve accessibility for useClickable#12218

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Parkreiner merged 1 commit intomainfrommes/hook-test-revamps-3
Feb 21, 2024

Conversation

Parkreiner
Copy link
Member

@ParkreinerParkreiner commentedFeb 19, 2024
edited
Loading

Part 3 for thehooks milestone

Changes made

  • UpdatesuseClickable to be much more compliant with WCAG guidelines
  • Adds test foruseClickable
  • Adds warning about design issues withuseClickableTableRow (see notes)

Notes

  • I really wanted to add a test for useClickableTableRow, but it turns out that even though it's trying to help with accessibility issues, it's actually causing more of them. I added this comment to the file:
    /** *@file 2024-02-19 - MES - Sadly, even though this hook aims to make elements * more accessible, it's doing the opposite right now. Per axe audits, the * current implementation will create a bunch of critical-level accessibility * violations: * * 1. Nesting interactive elements (e.g., workspace table rows having checkboxes *    inside them) * 2. Overriding the native element's role (in this case, turning a native table *    row into a button, which means that screen readers lose the ability to *    announce the row's data as part of a larger table) * * It might not make sense to test this hook until the underlying design * problems are fixed. */
    Just because fixing all this might require a more thorough rewrite throughout several parts of the codebase (figuring out the best way to have all the same functionality without breaking any WCAG requirements), I'm going to be punting this to a future PR.
  • For completion's sake, it feels like it'd be nice to make useClickable support the spinbutton role, but it's going to drastically alter the implementation, which doesn't feel worth it for something that we don't have a use case for right now. Added a comment about how it could make sense down the line, though

@ParkreinerParkreiner requested review froma team,aslilac andKira-Pilot and removed request fora team andaslilacFebruary 19, 2024 23:48
@ParkreinerParkreiner marked this pull request as ready for reviewFebruary 19, 2024 23:48
@ParkreinerParkreiner changed the titlefix: add tests and improve accessibility for useClickablefix(site): add tests and improve accessibility for useClickableFeb 19, 2024
* announce the row's data as part of a larger table)
*
* It might not make sense to test this hook until the underlying design
* problems are fixed.
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about moving this into a ticket as well as a note in the milestone?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah, just for documentation/visibility, I think that'd be best.
Wondering if we could use an accessibility milestone, too

Copy link
Member

@Kira-PilotKira-Pilot left a comment

Choose a reason for hiding this comment

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

This seems clean to me!

@ParkreinerParkreiner merged commit1d254f4 intomainFeb 21, 2024
@ParkreinerParkreiner deleted the mes/hook-test-revamps-3 branchFebruary 21, 2024 15:59
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 21, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@Kira-PilotKira-PilotKira-Pilot approved these changes

Assignees

@ParkreinerParkreiner

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Parkreiner@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp