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(FileListItem): accessibility improvements for FileListItem #1474

Merged
merged 1 commit into from
May 29, 2024

Conversation

alaa-yahia
Copy link
Member

@alaa-yahia alaa-yahia commented Apr 15, 2024

Implements LIBS-562


Description

Remove action in list of attached files is focusable and triggerable with enter& delete keys.


Checklist

  • API docs are generated
  • Tests were added
  • Storybook demos were added

@alaa-yahia alaa-yahia requested a review from a team as a code owner April 15, 2024 16:13
@dhis2-bot
Copy link
Contributor

🚀 Deployed on https://pr-1474--dhis2-ui.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify April 15, 2024 16:17 Inactive
event.key === 'Backspace' ||
event.key === 'Delete'
) {
onRemove({}, event)
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to call event.stopPropagation here?

Copy link
Collaborator

@kabaros kabaros left a comment

Choose a reason for hiding this comment

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

tested and working well - just address @Birkbjo comment please, it's generally safer to do event.stopPropagation for these special handlers, but let us know if that's not the case here.

file-input-focus

Copy link
Contributor

@d-rita d-rita left a comment

Choose a reason for hiding this comment

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

Works as expected! Can focus the "remove" action and trigger it with "Enter" and "Delete" keys.

@kabaros kabaros merged commit b5d5e2d into master May 29, 2024
15 checks passed
@kabaros kabaros deleted the LIBS-562-fileinput-accessibility-improvements branch May 29, 2024 08:46
Copy link

cypress bot commented May 29, 2024

Passing run #3405 ↗︎

0 584 0 0 Flakiness 0

Details:

feat(FileListItem): accessibility improvements for FileListItem (#1474)
Project: ui Commit: b5d5e2d5b0
Status: Passed Duration: 08:24 💡
Started: May 29, 2024 8:52 AM Ended: May 29, 2024 9:01 AM

Review all test suite changes for PR #1474 ↗︎

dhis2-bot added a commit that referenced this pull request May 29, 2024
# [9.5.0](v9.4.9...v9.5.0) (2024-05-29)

### Features

* **FileListItem:** accessibility improvements for FileListItem ([#1474](#1474)) ([b5d5e2d](b5d5e2d))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 9.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

5 participants