Setting the file. One moment.
Subchapter 43.2
rules/web-interface-guidelines.mdMarkdown8 KBView on GitHub
This document outlines a non-exhaustive list of details that make a good (web) interface. It is a living document, periodically updated based on learnings. Some of these may be subjective, but most apply to all websites.
The WAI-ARIA (opens in a new tab) spec is deliberately not duplicated in this document. However, some accessibility guidelines may be pointed out. Contributions are welcome. Edit this file and submit a pull request.
<form> to submit by pressing Entertype like password, email, etcspellcheck and autocomplete attributes most of the timerequired attribute when appropriateuser-select for inner contentpointer-events to not hijack eventspadding-webkit-font-smoothing: antialiased applied for better legibilitytext-rendering: optimizeLegibility applied for better legibilityclamp() (opens in a new tab), e.g. clamp(48px, 5vw, 72px) for the font-size of a headingfont-variant-numeric: tabular-nums, particularly in tables or when layout shifts are undesirable, like in timers-webkit-text-size-adjust: 100%scroll-behavior: smooth for navigating to in-page anchors, with an appropriate offset@media (hover: hover) 3Note 3Most touch devices on press will temporarily flash the hover state, unless explicitly only defined for pointer devices with @media (hover: hover) (opens in a new tab). Back to reference 3muted and playsinline to <video /> tags to auto play on iOStouch-action for custom components that implement pan and zoom gestures to prevent interference from native behavior like zooming and scrolling-webkit-tap-highlight-color: rgba(0,0,0,0), but always replace it with an appropriate alternativeblur() values for filter and backdrop-filter may be slowtransform: translateZ(0) for unperformant animationswill-change on unperformant scroll animations for the duration of the animation 4Note 4Use will-change (opens in a new tab) as a last resort to improve performance. Pre-emptively throwing it on elements for better performance may have the opposite effect. Back to reference 4mousedown, not clickprefers-color-schemearia-label<img> for screen readers and ease of copying from the right click menuaria-label instead of announcing the raw DOM tree to people using screen readers::selection state::selection