Skip to content

fix: Make create form keyboard accessible COMPASS-9335 #6896

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

Merged
merged 11 commits into from
May 9, 2025

Conversation

paula-stacho
Copy link
Contributor

@paula-stacho paula-stacho commented May 6, 2025

Description

Changes:

  • form steps can be submitted by enter
  • improved tab navigation
  • refactored SelectTable to SelectList. the table wasn't very accessible and there were no usages where we actually had more than one column (it is only used here and in connections import/export). so there was no reason for it to be a table instead of a list of classic checkboxes with labels.

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the fix label May 6, 2025
@paula-stacho paula-stacho added the no release notes Fix or feature not for release notes label May 6, 2025
@paula-stacho paula-stacho added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label May 6, 2025
@paula-stacho paula-stacho marked this pull request as ready for review May 6, 2025 15:54
name={`select-${item.id}`}
data-testid={`select-${item.id}`}
label={item[label[0]]}
aria-labelledby="select-table-item-label" // I don't know why LG requires this, it seems ignored
Copy link
Member

Choose a reason for hiding this comment

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

This should reference another element that labels this checkbox right? Should we go back to the aria-label?

Copy link
Contributor Author

@paula-stacho paula-stacho May 7, 2025

Choose a reason for hiding this comment

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

Ah! I tried to only include aria-label before but turns out it wasn't recognized and the labelledby was still required because the type of item[label[0]] isn't clear. this made me realise that actually it sometimes (in case of import) isn't a string but an element, so it makes sense to take a separate key for aria-label.
Unfortunately it's still not clear for TS - hence the typecasting as string. I did make an attempt to type it so that:
a) either item[label.displayLabelKey] is a string
b) orlabel.ariaLabelKey is required and item[label.ariaLabelKey] is a string.
But I couldn't get it working and it was getting overly complicated 🙈

@paula-stacho paula-stacho force-pushed the new-diagram-form-submit branch from a7a1b4f to 17e3e72 Compare May 7, 2025 12:10
Copy link
Member

@Anemy Anemy 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, one css usage we should move to a const at the top.

@paula-stacho paula-stacho force-pushed the new-diagram-form-submit branch from d59193d to 83357dd Compare May 7, 2025 15:56
@paula-stacho paula-stacho merged commit 540c4c5 into main May 9, 2025
56 checks passed
@paula-stacho paula-stacho deleted the new-diagram-form-submit branch May 9, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature flagged PRs labeled with this label will not be included in the release notes of the next release fix no release notes Fix or feature not for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants