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

Improve Accessibility of Modals #451

Closed
Sharqiewicz opened this issue May 16, 2024 · 0 comments · Fixed by #450
Closed

Improve Accessibility of Modals #451

Sharqiewicz opened this issue May 16, 2024 · 0 comments · Fixed by #450
Assignees

Comments

@Sharqiewicz
Copy link
Collaborator

Feature Request: Improve Accessibility of Modals

Description:

Modals in the application currently do not follow accessibility best practices, which can lead to a confusing user experience, especially for users relying on keyboard navigation or assistive technologies.

Current Issues:

  • Modals do not use the built-in <dialog> HTML tag, missing out on inherent accessibility features.
  • There is no autofocus on the modal, causing issues with keyboard navigation (e.g., users can tab out of the modal and lose focus).
  • Pressing the ESC key does not close the modal, which is an expected behavior for accessibility and usability.
  • Overall, the modals can be confusing and difficult to use for users.

Tasks:

  1. Utilize the Built-in <dialog> Tag:

    Refactor modal components to use the <dialog> HTML tag to benefit from built-in accessibility features.

  2. Update daisyUI:

    Upgrade to the latest version of daisyUI, which uses <dialog> instead of <div> for modal components.

  3. Implement React createPortal:

    Use React's createPortal to render modals outside the nested DOM hierarchy, ensuring they are placed at the top of the
    website's DOM. This will improve focus management and accessibility.

Expected Outcomes:

  • Enhanced accessibility for modals, making them easier to navigate and interact with using keyboard and assistive technologies.
  • Improved user experience by ensuring that focus is properly managed within modals.
  • Consistent and expected behaviour when interacting with modals, such as closing with the ESC key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant