kolibri-design-system icon indicating copy to clipboard operation
kolibri-design-system copied to clipboard

Add KFocusTrap and use it in KModal

Open MisRob opened this issue 1 year ago • 8 comments

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

Blocks

  • https://github.com/learningequality/kolibri/issues/12588

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 avatar Aug 22 '24 17:08 MisRob

hey @MisRob can you assign this to me?

lokesh-sagi125 avatar Aug 30 '24 13:08 lokesh-sagi125

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

MisRob avatar Aug 30 '24 16:08 MisRob

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

lokesh-sagi125 avatar Sep 01 '24 12:09 lokesh-sagi125

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

lokesh-sagi125 avatar Sep 02 '24 16:09 lokesh-sagi125

Its most likely the line spacing before the

<template>
    ...
</template>


<script>
    ...
</script>

akolson avatar Sep 02 '24 17:09 akolson

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.

MisRob avatar Sep 03 '24 06:09 MisRob

@MisRob Can you please assign this issue to me.

iamshobhraj avatar Sep 04 '24 20:09 iamshobhraj

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 avatar Sep 04 '24 21:09 AlexVelezLl

Closed by #799

AlexVelezLl avatar Oct 28 '24 17:10 AlexVelezLl