Roles and locks
Three roles decide what someone may change on a page:
- A designer changes anything: elements, styles, data and logic, and the locks. Admins, editors and the AI are designers.
- A builder adds, moves and removes components from the library, fills their slots with components and picks their variants. A builder doesn't add plain elements, and a component they add has plain values: no values from data and no locks.
- A content editor changes texts, images, link addresses and a component's properties. Values that come from data stay as they are.
Give a team member a custom role with website.pages.build to make them a builder, or with only the pages' own
permissions to make them a content editor. The editor shows their role in its header. A builder's Add offers only
components, and a content editor has no Add. Settings they may not change are read-only, and a change they may not
make is refused as they make it, with the reason.
A designer locks the selected part in Settings, under Locks:
- Keep in place: the part isn't moved or removed, and nothing is added to it or taken out of it;
- Keep styles: its classes, its own styles and its animations stay as they are;
- Lock these settings: chosen settings, such as a link's address or one property of a component, or all of them.
Locks hold builders and content editors, not designers. A locked part shows a lock in the structure panel. Roles and locks are checked on every save, from the editor, an AI assistant or any other way in.
What a page is made of, and the rules every save checks:
- Plain HTML elements (a section, a heading, a link around a card…), texts, components with slots, conditions (show this, otherwise that), lists over a collection or other data (one card per product, the six newest posts) and parts shown per visitor or responding in the browser.
- Only safe HTML: no scripts, styles, frames or embedded code, no event attributes, and links only to
https://,http://,mailto:,tel:or an address on the site. Images come from the media library (or a file on the site), never from another website; videos and audio from the site orhttps://. - Embedded HTML (a map, a booking widget's snippet) needs its own permission. Scripts and event attributes are refused in it when it is saved, and it is cleaned before it is shown.
- Ids and form field names can't be words the browser already uses for something else (
submit,action,name,location…): name a fieldfull-namerather thanname. - Pages stay valid HTML: no link inside a link or a button, no block inside a paragraph or heading, list items only in a list, table rows only in a table's head, body or foot, table cells only in a row. Components count too: a button component can't go in a link, and a link component's text can't hold another link. The editor won't offer a place that would be refused.
- What a visitor sees of their own data (their name, their bookings) is only filled in on the server, in the parts shown per visitor.
- Text is per language, with the default language's text required; content that fails a condition is left out of the page, never hidden in it.
- Pages made today keep opening after updates.
Formulas let a page follow its data without anyone writing code:
- A text, a link, an image, a condition or a list can take its value from a formula:
entry.title,upper(site.name),state.open ? 'Close' : 'Menu',formatMoney(product.price). Formulas read the page's entry, the site, the visitor (only in the parts shown per visitor), a component's properties, the values of a part that responds in the browser, and the item a list is at. - They can compare (
==,!=,<,>…), combine (&&,||,!), calculate (+,-,*,/,%), fall back (visitor.name ?? 'guest') and choose (… ? … : …), and call a fixed set of helpers: dates, numbers and amounts written the way the page's language writes them (18 oktober 2026,1.234,50,€ 12,50), the site's own translations, and helpers for texts (lower,upper,trim,slice,includes,startsWith,replace), lists (length,first,last,join,isEmpty) and numbers (min,max,round,floor,ceil,abs). - A formula is checked as it is typed and when the page is saved: a text can't stand where on/off is needed, a
number must be formatted before it is shown as text, and something that may be empty needs a fallback where a
decision is made. Each problem is underlined where it is, with a hint (
did you mean title?,format it with formatNumber(…)). Nothing is guessed: a formula that can't give its value shows an error, never a wrong value. - A part that responds in the browser keeps values (open or closed, a search text, a list of choices) and answers a
click, a key, typing, a change or a form being sent with actions: set or switch a value, go to an address
(
https://,http://,mailto:,tel:or the site's own), submit one of its forms, send a form to one of the published forms under Forms, search the site, call a module (adding to a wishlist), or play an animation. Only buttons, links and form fields answer clicks and keys, so everything stays usable with a keyboard. When the part starts it may set its values, play an animation or read from a module, but never go elsewhere, send a form or change something for the visitor without them asking. - A formula is never code: it can't run scripts, reach other websites or read anything beyond the data the page is
given. An address a formula gives (a link, a picture, where a button goes) passes the same check as a written one:
when the page is saved, for what is known then (
'javascript:…'is refused, and so is a formula with so many possible addresses that they can't all be checked: simplify it), and again when it is shown or followed, for what comes from the data or what a visitor typed.
Styles are what the Style panel sets (Styling an element):
- Styling starts from classes: a named style (Card, Button) used on any number of elements on any page, so changing it once changes them all. An element can also have its own styles, which win over its classes on the same screen size: a class's tablet value still wins on tablets over the element's own desktop value, so to change the element on tablets you set its own tablet value (the editor shows which one wins). An element's own styles belong to its page: a copy of the page starts without them.
- Each control sets one style property (a colour, a padding, a font size, a grid), from a fixed list. Values are chosen, not typed as code: a size with its unit, a colour, one of the property's options, or a variable.
- States and parts: a style can differ on hover, focus, keyboard focus, while pressed, when checked and when disabled, and can style an element's before and after parts, a field's placeholder and a list's markers. Checked applies to a checked checkbox or radio and to what holds one: a label around a radio, so two choices can look like buttons, the chosen one dark, while the radios stay real radios for keyboards and screen readers.
- States together: keyboard focus is also focus, so a focus style shows for keyboard users too unless a keyboard-focus style changes it; pressing an element with the mouse also hovers it. When several hold, the later in this list wins: hover, focus, keyboard focus, pressed, checked, disabled. So a checked choice keeps its look under the pointer, and a disabled one always looks disabled. A state's style wins over the same property without a state at every screen width.
- Variables are the site's colours, sizes, fonts, corner radii, shadows and numbers, in collections. A colour can have a light and a dark value: the site follows the visitor's light or dark setting, or a Light and dark switch on the page, and one part of a page can be shown in the other mode. The theme's colours, fonts and sizes are the first variables. A variable can only be used where its value fits: a size of 50 % can't be a border width, nor a negative size a padding.
- Breakpoints: a style can change on tablets and phones. A site starts from the phone and goes up (a new site does), or from the desktop and goes down. A part can also change with the width of the box it stands in (a card in a narrow sidebar and in a wide grid), and a size can grow smoothly with the screen between a minimum and a maximum.
- The editor shows where each value comes from: set here, from a larger screen, from the normal state, from another class or from the element's own styles. The site's variables, breakpoints and container queries are managed on the Site styles screen (Theme), which the Style panel links to.
- Styles can't reach beyond what they style: no free CSS, no images from other websites, no addresses that run
code, and no class or variable can change SHADE's own parts of the page, such as the cookie banner (names
starting with
shade-, and classes starting withsite-, are refused). The styles go live when a page is published. - Colour contrast is worked out from the variables in every mode, so the accessibility check finds text that is readable in light mode but not in dark mode.
The accessibility check runs on every publish, and in the editor's Accessibility panel:
- Errors stop publishing; warnings don't. An error is a failure of WCAG 2.1 AA, something that makes the page hard or impossible to use for some visitors, or a page the check can't read at all. Everything WCAG doesn't require is a warning, however questionable: the choice is yours. Warnings are, for example, a second heading 1, a skipped heading level, navigations without labels, a link inside a link, a part that changes on hover but has no focus style of its own (the browser's own focus ring still shows), a colour the check can't work out (check that text by eye), an image whose alt text looks like a file name, or embedded HTML the check can't see into.
- It looks inside components: a card used on ten pages is checked on each, with the text, images and settings each page gives it, and an issue inside a component says which one on the page it is in. A setting a page leaves empty counts as empty: a button component whose label you didn't fill in is an empty button. A component's variants are checked too, each with the classes it adds.
- It checks every version of the page: both sides of a condition (also the one you don't see while editing, such as the page for visitors who aren't signed in), and a list with items and without.
- What it checks (warning marks what only warns; the rest stops publishing):
- headings have text; and, both warnings, they go down one level at a time (no heading 2 followed by a heading 4) and a page has one heading 1;
- images have alt text, or are marked decorative (an empty alt text);
- links, buttons and form fields have a name or a label, and aren't empty; a placeholder is not a label;
- what reacts to a click is a button or a link with an address, so it can be reached with the keyboard;
- nothing hidden from screen readers can be reached with the keyboard;
- no link inside a link, no button inside a link and no heading inside a heading, also when a component changed after the page was saved (warning: the editor already refuses it when you save);
- a disclosure's summary, a group of fields' legend and a table's caption come first (warning);
- ids appear once on the page, also when a component is used twice or a list repeats, and a label or a description names an id that shows with it (not only on the other side of a condition);
- one main area, and a label on each navigation when there is more than one (warnings);
- contrast of every text against its background, in light and dark mode, on every screen size, on hover, when checked and on keyboard focus (4.5:1, or 3:1 for large text), the text on buttons and in filled-in fields too. Over a gradient, linear or radial, the check takes its least readable point; for a repeating gradient or colours placed at lengths (a dot grid), every colour counts. Text over a background image needs a background colour below the image that passes (it shows while the image loads); the image itself is a warning, to check by eye. A colour the check can't work out (a variable with no colour in dark mode, many see-through gradients over one another) is a warning, to check by eye;
- no style takes the focus outline away without showing focus another way; and a part that changes on hover also changes visibly on keyboard focus (a link whose title changes colour on hover too; warning, as long as the outline stays). A focus style counts only when it shows: a transparent outline, a colour that stays the same, a see-through gradient or one of the colour already behind (an extra colour with no width included), or an underline style set to what it already is, doesn't;
- text shown in another language than the page's (a text not translated yet) is marked with its language.
- In every language: a link that has text in Dutch but not in English is found on the English page.
What visitors get:
- Everything is decided before the page reaches the visitor: formulas filled in, conditions applied (what fails one is left out of the page, never hidden in it), lists repeated, components filled with their settings and slots. A formula that can't give its value shows nothing there, and the problem is reported.
- Every address is checked again when the page is shown, for what comes from the data or what a visitor typed: a link, a picture, a video, where a button goes. An address that isn't allowed is left out, never shown.
- Embedded HTML is cleaned into plain elements: scripts, styles, frames, forms, event attributes and unsafe addresses are taken out, the rest is kept.
- Parts shown per visitor are filled in for the visitor who asks, and only with what they show of that visitor (their name, say). Parts that respond in the browser get their values and only the data they show; never anything of the visitor.
- Ready-made accessible parts: a disclosure (more information), an accordion (one open at a time), tabs, a dialog that opens from a button, a menu of links, and a skip to content link for keyboard users. They work with the keyboard (arrow keys, Escape, Home and End), move focus where it should go and back, and say what they are to screen readers, without anyone setting that up.
- Text from a rich text field or setting shows with its headings, lists, bold and links; only those, and only links that are allowed.
- Pictures from the media library come in the size and format each visitor's screen and browser need. Every picture needs a description for screen readers, or is marked as decorative; one without either is shown as decorative and the editor is told.
- Each page gets its title, description, canonical address, its addresses in the other languages, the details for sharing on social media and for search engines; sites can list their pages in a sitemap.
- A page with parts shown for a visitor is that visitor's only: it is never kept for others.
- A page that would take too much to show (a component inside itself, a list over thousands of items) is refused rather than shown in part.
Animations follow these rules; the editor's Motion tab makes them (see Animating an element):
- An animation is something that moves or changes on the page: a heading that fades in when the page opens, a card that lifts when the pointer is over it, a menu panel that slides open when its button is clicked, a section that appears when it scrolls into view, or a picture that drifts while the page scrolls. A button inside a part of the page that responds to visitors can also play one, made for that: such an animation plays only when that part of the page asks for it, never on its own.
- You choose what starts it, which elements of the page it moves, and how: from where to where (see-through, moved, larger or smaller, turned, blurred, or another of the site's colours), how long, with which easing and how many times. Several steps can follow each other or overlap, each on its own elements.
- A hover also plays when someone reaches the element with the keyboard. A click only plays on what visitors can click from the keyboard too, such as buttons and links; a plain box is never made clickable.
- An animation can be limited to some screen sizes (only on desktop, say).
- Visitors who asked their device for less motion get no animation: by default the fading and the colours jump straight to how they end, and the movement is left out; an animation can also jump straight to its whole end, or not play at all for them. This can't be turned off, and it holds from the moment a visitor changes the setting, also for what already played once.
- What starts by itself (when the page opens or something scrolls into view) stops within five seconds, and nothing repeats forever. A part of the page that plays animations as it opens plays five seconds of them at most in all.
- Nothing flashes more than three times a second: an animation that makes an element go back and forth more than that, in one go, over its repeats or over several steps, is refused when you save it, with the element it is about. What an element shows is counted together: its see-through-ness, its colours, shrinking to nothing, blurring or moving out of sight, and what the elements around it in the same animation do (a card's fade fades its picture too). Everything a page plays as it loads starts together, so it is counted together. A long, smooth fade doesn't count as flashing, however many steps it has; going back and forth does. Something that follows the scroll may only go back and forth a few times in all, as a visitor can scroll through it at once.
- Something that appears when it scrolls into view always appears: a section taller than the screen counts as seen once it fills enough of the screen.
- Colours come from the site's colour variables, so they follow light and dark mode; there is no free code or CSS. Pages without animations load nothing extra.
For developers
The code and its tests: the README of shade-plugin-website.