Accessible Dialog/Modal | Webflow

An accessible dialog/modal in Webflow. Check it out Live: https://accessible-dialog.webflow.io/

What makes a Modal accessible? ⬇

When the modal is open, elements behind it should become inactive.

The focus should shift to an element within the modal upon opening.

When the modal closes, focus should return to the original activating element.

Focus should be trapped within the modal while it is open, preventing users from tabbing to elements outside the modal. This is natively in the <dialog> element.

The modal should be closable by pressing the Escape key.

The modal should not be part of the tab order when it is closed.

It’s also important to respect user preferences. For users who prefer reduced motion, adjust animations accordingly.

You can also just open the Modal in the Webflow Editor with a custom attribute on the <dialog> element open="true" for example.

πŸ¦† x.com

πŸ‘” LinkedIn

🌈 Webflow

πŸ€ Dribbble

Eduard Bodak
Designer who codes with accessibility on Webflow.
Get in touch

More by Eduard Bodak

View profile