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

[terra-slide-panel] Find closest focusable element on click #2159

Merged
merged 4 commits into from
May 8, 2024

Conversation

artpark
Copy link
Contributor

@artpark artpark commented May 8, 2024

Summary

What was changed:

  • Updated set last clicked method to find the closest focusable element
  • Updated Slide Panel Multiple Buttons Toggle test to use terra-buttons
  • Updated wdio spec to remove body focus check

Why it was changed:
When disclosing a slide panel, the element that was clicked on is stored as the "last clicked" item. On terra-buttons, a is clicked instead of the , so the last clicked item is stored as a span. This change finds the closest focusable element by repeatedly checking its parent element.

Testing

This change was tested using:

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

Used the Slide Panel Multiple Buttons Toggle test to verify changes

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10167


Thank you for contributing to Terra.
@cerner/terra

@artpark artpark requested a review from a team May 8, 2024 14:44
@artpark artpark self-assigned this May 8, 2024
@github-actions github-actions bot temporarily deployed to preview-pr-2159 May 8, 2024 14:48 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2159 May 8, 2024 15:08 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2159 May 8, 2024 15:18 Destroyed
@artpark artpark merged commit 7fbc549 into main May 8, 2024
22 checks passed
@artpark artpark deleted the slide-panel-focus branch May 8, 2024 21:09
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