SSMW - Single Standard for Modal Windows

SSMW - Single Standard for Modal Windows

3

2 min.

Definitions

The SSMW standard defines requirements for the semantics, accessibility, and logic of modal windows.

Positioning and scrolling:

  • For Safari, use overscroll-behavior-y: none; to prevent “rubber band” scrolling;

  • When the keyboard is open on mobile devices, the window is aligned to the top edge so that the input field remains visible.

Structure and Semantics

<dialog> is the preferred element for modal windows.

  • Provides built-in support for aria-modal="true", which improves accessibility.

CSS Positioning:

  • If <dialog> is rendered inside a container other than body, position: static is set to prevent the inheritance of conflicting properties;

  • Standard absolute or fixed positioning is used for overlays at the document root.

Optimization:

  • The modal element should only be added to the DOM when the modal is invoked;

  • To prevent interface misalignment when scrolling on the main page is blocked, scrollbar-gutter: stable; is recommended on the HTML element.

Accessibility

Focus and Navigation:

  • The modal window should manage focus locally;

  • The user can navigate between interactive elements using Tab without leaving the modal.

Form inside the modal:

  • Automatic focus on the first input field after opening the window speeds up data entry.

Nested modals:

  • When multiple layers are present, z-index and focus must be managed correctly;

  • Scroll locking and focus logic apply only to the topmost active layer.

Interactivity and Visual Feedback

Closing and Control:

  • The modal window must respond correctly to all three standard closing methods: Esc, the “Close” button, and clicks on the backdrop.

Forms and Completion Scenarios:

  • After the form is successfully submitted, the modal closes, giving way to a brief success message.

    This completion scenario ensures a predictable and pleasant user experience.

Animations:

  • It is recommended to implement the modal’s entry and exit using CSS classes with smooth transitions.

    This adds a sense of completeness and visual smoothness to the interface.

Padding and Responsiveness:

  • Internal padding prevents the modal from sticking to the screen edges;
  • Vertical scrolling should be comfortable on small viewport.
The article will be supplemented

Similar categories:

Similar articles

  • SSA - Single Standard for Accordion

    The SSA standard defines requirements for the semantics, accessibility, and logic of accordion operation.

    255

    3 min.

  • Bad Practices for Websites

    An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google and Yandex

    76

    2 min.

  • SSP - Single standard for pagination

    The SSP standard defines requirements for the semantics, accessibility, and logic of page-by-page navigation

    168

    1 min.

  • SSPS - Single Standard for Project Structure

    The SSPS standard defines requirements for the structure and naming of files and folders in a project

    117

    2 min.

  • SSB-C - Single standard for breadcrumbs

    The SSB-C standard defines requirements for the semantics, accessibility, and logic of breadcrumbs

    3

    2 min.

  • SSBM - Single Standard for Modal Windows

    The SSBM standard defines requirements for the semantics, accessibility, and logic of burger menus

    2

    2 min.

Project type*