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
45
2 min.

200
2 min.
The SSA standard defines requirements for the semantics, accessibility, and logic of accordion functionality.
Accordion elements in this standard are called spoilers. Spoilers can be separate entities from the accordion, but they are rarely used independently.
The foundation of an accordion is a <ul> list. This ensures that assistive technologies perceive a group of spoilers as a single list of related elements.
Inside each list item <li>, there is a <details> tag, which strictly contains:
<summary>;<div>.<ul class="ssa-accordion"> <li class="ssa-spoiler"> <details class="ssa-spoiler__details" name="faq"> <summary class="ssa-spoiler__summary"> <h3 class="ssa-spoiler__title">Trigger Text</h3> <span class="ssa-spoiler__icon" aria-hidden="true"></span> </summary> <div class="ssa-spoiler__content"></div> </details> </li> </ul>
The
nameattribute allows you to create accordions where only one spoiler can be open at a time (provided all items in the group have the samenamevalue).
State Semantics - the "expanded/collapsed" state is automatically conveyed to screen readers thanks to the use of the native <details> tag. No additional ARIA attributes are required.
Hiding Decorative Elements - the icon (arrow) always has aria-hidden="true" added. It serves a visual function, and voicing it would create unnecessary "noise" for the user.
Keyboard Navigation - thanks to <summary>, the element automatically receives focus when Tab is pressed and is activated by Enter or Space keys.
Visual Focus - the :focus-visible pseudo-class must be used. When navigating with the keyboard, users should see a clear outline of the active element.
Heading Hierarchy - the text inside the trigger should be wrapped in a heading (<h3>–<h6>) that corresponds to the page structure, so screen reader users can quickly navigate through accordion sections.
The click area of the <summary> trigger should be as large as possible. This is critical for mobile devices.
The trigger and content should have separate internal padding. This increases the active area without "collapsing" the text.
Users should immediately understand the state of an element through three types of reactions:
/* Base styles */ .ssa-spoiler__summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; cursor: pointer; list-style: none; /* Hide system marker */ } .ssa-spoiler__summary::-webkit-details-marker { display: none; } .ssa-spoiler__summary:hover { background-color: rgb(0 0 0 / 5%); } /* State when open */ .ssa-spoiler__details[open] .ssa-spoiler__summary { background-color: #f8f9fa; border-block-end: 1px solid #eee; } /* Icon animation */ .ssa-spoiler__icon { flex-shrink: 0; inline-size: 24px; block-size: 24px; transition: rotate 0.3s ease-in-out; } .ssa-spoiler__details[open] .ssa-spoiler__icon { rotate: 180deg; }
The article will be supplemented
An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google and Yandex
45
2 min.
The SSP standard defines requirements for the semantics, accessibility, and logic of page-by-page navigation
146
1 min.
The SSPS standard defines requirements for the structure and naming of files and folders in a project
94
2 min.
The SSV standard defines requirements for semantics, background and interactive video settings, attributes for Safari, accessibility rules, and video weight
140
4 min.
Troubleshooting Vite issues when using a VPN, configuring the connection to prevent local traffic from being redirected through the VPN tunnel
184
2 min.