pendulum-chain / portal

The Pendulum/Amplitude portal UI
GNU General Public License v3.0
1 stars 1 forks source link

Improve Accessibility of Modals #451

Closed Sharqiewicz closed 4 months ago

Sharqiewicz commented 4 months ago

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:

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: