Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-folder-tree] Increase radio button click target size #2137

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

sycombs
Copy link
Contributor

@sycombs sycombs commented Apr 15, 2024

Summary

This change increases the size of the radio button click target to meet target size accessibility requirements so that users do not have to click inside a small radio button to select a row.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10097


Thank you for contributing to Terra.
@cerner/terra

@github-actions github-actions bot temporarily deployed to preview-pr-2137 April 17, 2024 21:08 Destroyed
@sycombs sycombs self-assigned this Apr 18, 2024
@@ -133,16 +133,23 @@ const FolderTreeItem = ({
? <IconCaretDown height="8px" width="8px" style={{ verticalAlign: 'baseline' }} /> // eslint-disable-line react/forbid-component-props
: <IconCaretRight height="8px" width="8px" style={{ verticalAlign: 'baseline' }} />; // eslint-disable-line react/forbid-component-props

/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/label-has-associated-control */
Copy link
Contributor Author

@sycombs sycombs Apr 18, 2024

Choose a reason for hiding this comment

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

Trying to see if there is any change to avoid disabling these. For now these rules are all being disabled because:

  1. jsx-a11y/click-events-have-key-events - the onClick is only used to stop propagation and prevent expand/collapse, which is not an issue for the keyboard interactions
  2. jsx-a11y/no-noninteractive-element-interactions - this is just unavoidable as long as there is an onClick on a label.
  3. jsx-a11y/label-has-associated-control - not sure if a bug but in theory nesting label -> input the way is being done here should satisfy this rule, only disabling because none of the suggested solutions resolved the error

@sycombs sycombs marked this pull request as ready for review April 18, 2024 13:50
@sycombs sycombs requested a review from a team April 18, 2024 13:50
Copy link
Contributor

@adoroshk adoroshk left a comment

Choose a reason for hiding this comment

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

I verified that click on the label area around the checkbox works the same way as the click on the checkbox. LGTM.
Screenshot 2024-04-18 at 11 24 26 AM

Copy link
Contributor

@sdadn sdadn left a comment

Choose a reason for hiding this comment

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

Looks good!

@adoroshk adoroshk merged commit b4563e0 into main Apr 18, 2024
22 checks passed
@adoroshk adoroshk deleted the folder-tree_radio branch April 18, 2024 18:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants