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

Add KFocusTrap and use it in KModal #746

Closed
3 tasks
MisRob opened this issue Aug 22, 2024 · 9 comments
Closed
3 tasks

Add KFocusTrap and use it in KModal #746

MisRob opened this issue Aug 22, 2024 · 9 comments
Assignees
Labels
Component: KFocusTrap Component: KModal good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P2 - normal Priority: Nice to have

Comments

@MisRob
Copy link
Member

MisRob commented Aug 22, 2024

🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.

Blocks

Summary

This issue has two related goals

  • Move focus trapping logic from Kolibri to this repository and expose it as a new KFocusTrap component
  • Use KFocusTrap within KModal to ensure that users' focus remains contained within the modal interface, preventing accidental interactions with elements outside the modal.

Guidance

(1) Create KFocusTrap

Copy FocusTrap from Kolibri to this repository and name it as KFocusTrap. Follow the guidance for creating a new component.

(2) Wrap the content of KModal in KFocusTrap

// KModal.vue
<template>
  <KFocusTrap>
    <component :is="wrapper" ...>
    ...

(3) Check that the focus trapping works as expected

on the the playground page.

(4) Add a new documentation page for KFocusTrap

The Value Add

Improves accessibility of modals.

Acceptance criteria

  • There is KFocusTrap component including a new documentation page
  • KFocusTrap is used within KModal and functions as expected
  • There are no regressions in KModal
@MisRob MisRob added Component: KModal good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome Component: KFocusTrap labels Aug 22, 2024
@MisRob MisRob added the P2 - normal Priority: Nice to have label Aug 22, 2024
@lokesh-sagi125
Copy link
Contributor

hey @MisRob can you assign this to me?

@MisRob
Copy link
Member Author

MisRob commented Aug 30, 2024

Hey @lokesh-sagi125, assigning, thank you for volunteering

@lokesh-sagi125
Copy link
Contributor

hey @MisRob is there any chat server for LE like discord or is it just github?

@lokesh-sagi125
Copy link
Contributor

hey @akolson @MisRob i keep getting this particular linting issue even though i added the blank lines. ,couldn't find the solution in the documentation , what should i do to fix this?.
Screenshot 2024-09-02 at 10 13 03 PM

@akolson
Copy link
Member

akolson commented Sep 2, 2024

Its most likely the line spacing before the <script> tag -- they must be 2 lines. Also the script tag should be at the start of the line and no spaces before it. For example,

<template>
    ...
</template>


<script>
    ...
</script>

@MisRob
Copy link
Member Author

MisRob commented Sep 3, 2024

hey @MisRob is there any chat server for LE like discord or is it just github?

@lokesh-sagi125 Yes, we have a Slack channel for the community of contributors. You're welcome to send an e-mail to [email protected] to receive an invitation.

@iamshobhraj
Copy link
Contributor

@MisRob Can you please assign this issue to me.

@AlexVelezLl
Copy link
Member

Hey @iamshobhraj! Thanks for your interest in contributing to this issue! Unfortunately, this is already assigned. But you’re welcome to find a "help wanted" issue with no assignee :).

@AlexVelezLl
Copy link
Member

Closed by #799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: KFocusTrap Component: KModal good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P2 - normal Priority: Nice to have
Projects
None yet
Development

No branches or pull requests

5 participants