Components and accessibility contracts (part 5 of 6)
Part of Design system, which is built from DESIGN.md in the repository, where it is edited.
| Component | Contract |
|---|---|
| Zoom window status | A status line under a layer outside its zoom window, naming the normalised zoom level, the same scale as the map readout (at most one decimal): "Zoom in to level 9 or closer to load this layer." for a query layer below its minzoom or a vector tile layer below its minzoom, and "Zoom out below level 12 to see this layer." for a vector tile layer at or above its maxzoom, because the engine hides a layer from its maxzoom. A level with more than one decimal is rounded the safe way (up for zooming in, down for zooming out). The level comes from the layer's definition, so a layer without a window has no such line, and a raster tile source's maxzoom, which is only the deepest tile level, is not a window. A query layer that shows only the first features says "Showing the first N. Zoom in to see more." Each message is announced once through LiveRegion ("Places: zoom in to level 9 or closer to load this layer."), and again after the layer has been back inside its window. |
FeatureChoices | A section named "N features here" (the heading takes focus when a tap or the I key opened it), a list of full-width buttons that each name a feature and its layer, and "Close list". A row opens that feature's card, which has "Back to list" while the list is open. A row for a feature found by a tap on a raster layer has no glyph, since it has no style to draw one from. |
ExportSection | A region named "Save image" with a plain button. It saves a PNG of the map with its layers and credits, is busy while the image is made, and announces success politely and failure assertively. |
| Text links | Links inside running text use the normal inline line box, stay underlined and show the visible two-tone focus ring; their target size is exempt from the 44 px minimum by WCAG 2.2 criterion 2.5.8. A standalone link, including the privacy policy's back links and the Settings and Help About links, remains an inline flex target with the minimum target height. |
| Help About block | The last subsection of Help, below Accessibility, shown only when the host passes about (SheetContent and HelpSection: a heading, a line of text, one link out and, optionally, a link to the host's own page, all the host's words). The link out is a standard inline link with the Settings link's underline and focus ring, opens in a new tab with rel="noopener noreferrer", and says so to a screen reader with visually hidden text, as the feature card's link does. The own-page link (homeLink) comes first, looks the same, opens in the same tab, and is drawn only for a path on the site or an http or https address. The reference host's block says the site is open source under the AGPL-3.0, leads back to the product page at / ("About MapCairn, the SDK behind this map") and links to the source repository (SOURCE_REPOSITORY_URL). It is plain text and a link: nothing is fetched from the repository. The privacy policy link stays in Settings, in the same sheet, and the credits stay on the map's credits button. |
| Settings privacy statement | A paragraph under the "Privacy" subheading in Settings, followed by a "Read the privacy policy" link. The text is the host's (privacyNote, text or nodes); without one the SDK shows a neutral sentence that names no provider. It is plain text, not a live region. The reference host's text is in the host.notes.* entries of the message catalogue (English in packages/core/src/messages/en-GB.ts, Afrikaans in packages/web/src/i18n/af.ts) and matches the privacy page. |
PinCard lookup note | The paragraph under "Look up address" that says what the lookup sends and to whom, and that describes the button (aria-describedby). The text is the host's (lookupNote); the default says the position goes, to about 11 m, to the address service and names no provider. |