@capagents/forgeqe 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/HOW_TO_USE.md +465 -95
  2. package/README.md +21 -6
  3. package/THIRD_PARTY_NOTICES.md +210 -1
  4. package/dist/docs-site/CREDITS.md +6 -0
  5. package/dist/docs-site/architecture-map/index.html +1 -1
  6. package/dist/docs-site/docs/app-theme.css +100 -8
  7. package/dist/docs-site/docs/architecture/index.html +210 -214
  8. package/dist/docs-site/docs/area-api/index.html +350 -0
  9. package/dist/docs-site/docs/area-automated-tests/index.html +967 -0
  10. package/dist/docs-site/docs/area-browser/index.html +430 -0
  11. package/dist/docs-site/docs/area-data/index.html +605 -0
  12. package/dist/docs-site/docs/area-desktop/index.html +755 -0
  13. package/dist/docs-site/docs/area-mobile/index.html +631 -0
  14. package/dist/docs-site/docs/area-operations/index.html +1069 -0
  15. package/dist/docs-site/docs/area-pull-requests/index.html +208 -0
  16. package/dist/docs-site/docs/area-quality/index.html +365 -0
  17. package/dist/docs-site/docs/area-release/index.html +320 -0
  18. package/dist/docs-site/docs/area-setup/index.html +1192 -0
  19. package/dist/docs-site/docs/area-systems/index.html +207 -0
  20. package/dist/docs-site/docs/area-test-cases/index.html +694 -0
  21. package/dist/docs-site/docs/containers/index.html +97 -104
  22. package/dist/docs-site/docs/cost-architecture/index.html +108 -112
  23. package/dist/docs-site/docs/custom-agents-first-run/index.html +19 -23
  24. package/dist/docs-site/docs/desktop/index.html +172 -162
  25. package/dist/docs-site/docs/desktop-ci/index.html +26 -33
  26. package/dist/docs-site/docs/evidence/index.html +253 -257
  27. package/dist/docs-site/docs/feature-test-prompts/index.html +66 -70
  28. package/dist/docs-site/docs/get-started/index.html +495 -0
  29. package/dist/docs-site/docs/graphify/index.html +42 -46
  30. package/dist/docs-site/docs/guardrails/index.html +17 -21
  31. package/dist/docs-site/docs/index.html +17 -6708
  32. package/dist/docs-site/docs/mobile/index.html +155 -162
  33. package/dist/docs-site/docs/model-routing/index.html +44 -51
  34. package/dist/docs-site/docs/overview/index.html +176 -0
  35. package/dist/docs-site/docs/product-graph/index.html +52 -55
  36. package/dist/docs-site/docs/product-knowledge/index.html +11 -15
  37. package/dist/docs-site/docs/product-views/index.html +53 -57
  38. package/dist/docs-site/docs/reference/index.html +379 -0
  39. package/dist/docs-site/docs/search.js +1 -1
  40. package/dist/docs-site/docs/using/index.html +480 -0
  41. package/dist/docs-site/docs/web-app/index.html +147 -93
  42. package/dist/docs-site/security/index.html +930 -0
  43. package/dist/docs-site/security/security-theme.css +161 -0
  44. package/dist/docs-site/security/security.js +1465 -0
  45. package/dist/docs-site/vendor/react-18.3.1.production.min.js +31 -0
  46. package/dist/docs-site/vendor/react-dom-18.3.1.production.min.js +267 -0
  47. package/dist/docs-site/vendor/reactflow-11.11.4.umd.js +10 -0
  48. package/dist/forgeqe.js +2251 -1886
  49. package/dist/web/THIRD_PARTY_NOTICES.md +0 -136
  50. package/dist/web/assets/Agent-CPhmZdFX.js +8 -0
  51. package/dist/web/assets/AgentWork-BXdN9xgi.js +2 -0
  52. package/dist/web/assets/ApiTests-Do3xLjfB.js +10 -0
  53. package/dist/web/assets/Browse-WVkJT6Bs.js +2 -0
  54. package/dist/web/assets/Chat-CDc9UcQX.js +3 -0
  55. package/dist/web/assets/CommandPalette-BAZm62lV.js +1 -0
  56. package/dist/web/assets/Compare-Br6n9T9L.js +1 -0
  57. package/dist/web/assets/Cost-BBUyBu3Y.js +1 -0
  58. package/dist/web/assets/Data-Ch2DPEWp.js +6 -0
  59. package/dist/web/assets/Desktop-Qzoq-cQv.js +1 -0
  60. package/dist/web/assets/DesktopReview-CF_jQYAM.js +1 -0
  61. package/dist/web/assets/Evidence-C72Lj5_Q.js +1 -0
  62. package/dist/web/assets/Explore-ObkEpUyS.js +2 -0
  63. package/dist/web/assets/Features-CQzNo_WP.js +1 -0
  64. package/dist/web/assets/Flags-0-RniPJm.js +2 -0
  65. package/dist/web/assets/Flaky-BPJvNLCA.js +1 -0
  66. package/dist/web/assets/Impact-CfccsL_k.js +3 -0
  67. package/dist/web/assets/Jobs-T6m4zhDy.js +5 -0
  68. package/dist/web/assets/KindPage-BDUvWe2p.js +6 -0
  69. package/dist/web/assets/Migration-Dqeh4x5u.js +2 -0
  70. package/dist/web/assets/PageAgent-DNjzIgeY.js +1 -0
  71. package/dist/web/assets/Product-nYV_scOV.js +7 -0
  72. package/dist/web/assets/Production-CGSbEWVa.js +1 -0
  73. package/dist/web/assets/Quality-BIypojZm.js +1 -0
  74. package/dist/web/assets/Readiness-BlRjwJRg.js +1 -0
  75. package/dist/web/assets/Record-v2KLI-_Z.js +1 -0
  76. package/dist/web/assets/Regression-B-jSt4Jz.js +5 -0
  77. package/dist/web/assets/RelationGraph-8J98lOVG.js +1 -0
  78. package/dist/web/assets/Reports-GI4u6SyW.js +2 -0
  79. package/dist/web/assets/Response-mhBThq2b.js +9 -0
  80. package/dist/web/assets/Responsive-DXu7Ra7K.js +3 -0
  81. package/dist/web/assets/RunDiff-D0SHDNp0.js +1 -0
  82. package/dist/web/assets/Runs-C1Gjdi9M.js +2 -0
  83. package/dist/web/assets/Settings-BGGeuvyF.js +21 -0
  84. package/dist/web/assets/Steps-D-YG0eJy.js +2 -0
  85. package/dist/web/assets/TestCases-DC4w77eQ.js +1 -0
  86. package/dist/web/assets/TestData-CvKWRVVV.js +2 -0
  87. package/dist/web/assets/TestDebt-D8YzN29_.js +1 -0
  88. package/dist/web/assets/TestManagement-C5cDCqrD.js +1 -0
  89. package/dist/web/assets/Tosca-BGUv3RiJ.js +3 -0
  90. package/dist/web/assets/WhatsNew-B_Gyuv8O.js +1 -0
  91. package/dist/web/assets/agents-C0Jg2pN8.js +1 -0
  92. package/dist/web/assets/coverage-BMP6ELFJ.js +5 -0
  93. package/dist/web/assets/dataParts-DbeCj9ga.js +3 -0
  94. package/dist/web/assets/diff-BStuTmsN.js +2 -0
  95. package/dist/web/assets/families-BBFFrUlo.js +1 -0
  96. package/dist/web/assets/filters-CnAMr286.js +1 -0
  97. package/dist/web/assets/fold-D_O_VZui.js +1 -0
  98. package/dist/web/assets/head-CRo48rPt.js +1 -0
  99. package/dist/web/assets/highlight-BcFZIf59.js +4 -0
  100. package/dist/web/assets/index-B3JsM7tv.js +64 -0
  101. package/dist/web/assets/index-CafApcbZ.css +2 -0
  102. package/dist/web/assets/input-CtzK50ZF.js +1 -0
  103. package/dist/web/assets/jsx-runtime-LKYXHABd.js +1 -0
  104. package/dist/web/assets/line-icons-rdF8DYDJ.js +1 -0
  105. package/dist/web/assets/logos-D4oVWzqa.js +1 -0
  106. package/dist/web/assets/palette-DAaGSao7.js +1 -0
  107. package/dist/web/assets/paletteCommands-Co-RlQ8q.js +1 -0
  108. package/dist/web/assets/parts-D357Wolo.js +1 -0
  109. package/dist/web/assets/productParts-B8oHRCJF.js +1 -0
  110. package/dist/web/assets/qualityParts-BLkmIfDY.js +1 -0
  111. package/dist/web/assets/recordTest-Cez2sDJO.js +1 -0
  112. package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  113. package/dist/web/assets/route-BloYJWgw.js +1 -0
  114. package/dist/web/index.html +12 -12
  115. package/docs/ARCHITECTURE.md +1 -1
  116. package/docs/BASAL.md +1 -1
  117. package/docs/DESKTOP.md +20 -1
  118. package/docs/EVIDENCE.md +1 -1
  119. package/docs/MOBILE.md +4 -4
  120. package/docs/PRODUCT_KNOWLEDGE.md +2 -0
  121. package/docs/WEB_APP.md +114 -51
  122. package/docs/user-guide.html +463 -87
  123. package/forgeqe.example.yaml +3 -3
  124. package/package.json +1 -1
  125. package/prompts/page-differs.md +1 -1
  126. package/prompts/requests-rule.md +1 -1
  127. package/prompts/responsive-review.md +38 -0
  128. package/prompts/responsive-split.md +40 -0
  129. package/prompts/responsive.md +42 -0
  130. package/prompts/test-reviewer.md +1 -1
  131. package/prompts/test-rules.md +3 -4
  132. package/skills/web-guidance/LICENSE +202 -0
  133. package/skills/web-guidance/SKILL.md +76 -0
  134. package/skills/web-guidance/UPSTREAM +67 -0
  135. package/skills/web-guidance/references/accessibility/accessibility.md +585 -0
  136. package/skills/web-guidance/references/accessibility/accessible-error-announcement.md +302 -0
  137. package/skills/web-guidance/references/accessibility/accessible-generated-content.md +41 -0
  138. package/skills/web-guidance/references/accessibility/respect-os-text-scale.md +127 -0
  139. package/skills/web-guidance/references/css/responsive-design.md +16 -0
  140. package/skills/web-guidance/references/forms/autofill-address-form.md +86 -0
  141. package/skills/web-guidance/references/forms/autofill-payment-form.md +142 -0
  142. package/skills/web-guidance/references/forms/autofill-sign-in-form.md +145 -0
  143. package/skills/web-guidance/references/forms/autofill-sign-up-form.md +155 -0
  144. package/skills/web-guidance/references/forms/forms.md +415 -0
  145. package/skills/web-guidance/references/forms/ime-safe-enter-submit.md +115 -0
  146. package/skills/web-guidance/references/forms/required-field-feedback.md +317 -0
  147. package/skills/web-guidance/references/forms/select-menu-interaction.md +310 -0
  148. package/skills/web-guidance/references/forms/slider.md +184 -0
  149. package/skills/web-guidance/references/forms/sms-otp-form.md +208 -0
  150. package/skills/web-guidance/references/forms/switch.md +60 -0
  151. package/skills/web-guidance/references/forms/validate-input-after-interaction.md +406 -0
  152. package/skills/web-guidance/references/performance/break-up-long-tasks.md +64 -0
  153. package/skills/web-guidance/references/performance/identify-heavy-scripts.md +69 -0
  154. package/skills/web-guidance/references/performance/identify-inp-causes.md +105 -0
  155. package/skills/web-guidance/references/performance/interaction-paint-timing.md +200 -0
  156. package/skills/web-guidance/references/performance/optimize-image-priority.md +73 -0
  157. package/skills/web-guidance/references/performance/performance.md +384 -0
  158. package/skills/web-guidance/references/privacy/privacy.md +247 -0
  159. package/skills/web-guidance/references/security/passkey-authentication.md +218 -0
  160. package/skills/web-guidance/references/security/passkey-management.md +310 -0
  161. package/skills/web-guidance/references/security/passkey-reauthentication.md +142 -0
  162. package/skills/web-guidance/references/security/passkey-registration.md +186 -0
  163. package/skills/web-guidance/references/security/passkeys.md +39 -0
  164. package/skills/web-guidance/references/security/sanitize-untrusted-html.md +105 -0
  165. package/skills/web-guidance/references/security/secure-external-subresources.md +202 -0
  166. package/skills/web-guidance/references/security/security.md +390 -0
  167. package/skills/web-guidance/references/security/trusted-types.md +141 -0
  168. package/skills/web-guidance/references/security/validate-origins.md +197 -0
  169. package/skills/web-guidance/references/security/verify-email-ownership.md +235 -0
  170. package/skills/web-guidance/references/ui-atoms/position-aware-tooltips.md +173 -0
  171. package/skills/web-guidance/references/ui-atoms/responsive-table.md +122 -0
  172. package/skills/web-guidance/references/ui-atoms/viewport-aware-dropdowns.md +178 -0
  173. package/skills/web-guidance/references/ui-behaviors/drag-and-drop.md +108 -0
  174. package/skills/web-guidance/references/ui-behaviors/light-dismiss-a-dialog.md +89 -0
  175. package/skills/web-guidance/references/ui-behaviors/motion.md +97 -0
  176. package/skills/web-guidance/references/ui-behaviors/platform-controls-dismiss-dialog.md +40 -0
  177. package/skills/web-guidance/references/ui-behaviors/prevent-page-scroll-under-modal-dialog.md +59 -0
  178. package/skills/web-guidance/references/ui-behaviors/search-hidden-content.md +141 -0
  179. package/skills/web-guidance/references/ui-behaviors/sortable-table.md +140 -0
  180. package/skills/web-guidance/references/ui-components/accordion.md +343 -0
  181. package/skills/web-guidance/references/ui-components/breadcrumbs.md +168 -0
  182. package/skills/web-guidance/references/ui-components/carousel.md +206 -0
  183. package/skills/web-guidance/references/ui-components/checkbox.md +144 -0
  184. package/skills/web-guidance/references/ui-components/dialog.md +218 -0
  185. package/skills/web-guidance/references/ui-components/hovercard.md +391 -0
  186. package/skills/web-guidance/references/ui-components/menu.md +415 -0
  187. package/skills/web-guidance/references/ui-components/navbar.md +281 -0
  188. package/skills/web-guidance/references/ui-components/navigation-drawer.md +429 -0
  189. package/skills/web-guidance/references/ui-components/persistent-toast-notifications.md +185 -0
  190. package/skills/web-guidance/references/ui-components/progress.md +181 -0
  191. package/skills/web-guidance/references/ui-components/spinner.md +179 -0
  192. package/skills/web-guidance/references/ui-components/tabs.md +371 -0
  193. package/skills/web-guidance/references/ui-components/toolbar.md +277 -0
  194. package/skills/web-guidance/references/user-experience/form-factor-adaptation.md +120 -0
  195. package/skills/web-guidance/references/user-experience/natural-interactions.md +155 -0
  196. package/skills/web-guidance/references/visual-design/color.md +43 -0
  197. package/skills/web-guidance/references/visual-design/dark-mode.md +350 -0
  198. package/dist/web/assets/AgentWork-C3KdZh5M.js +0 -2
  199. package/dist/web/assets/ApiTests-BLnl7JGO.js +0 -10
  200. package/dist/web/assets/Browse-C-Enjpmd.js +0 -2
  201. package/dist/web/assets/Chat-Bt6jZI68.js +0 -3
  202. package/dist/web/assets/Choices-D5eTFinz.js +0 -3
  203. package/dist/web/assets/CommandPalette-D89NM2_E.js +0 -1
  204. package/dist/web/assets/Compare-YfFYHwfK.js +0 -1
  205. package/dist/web/assets/Cost-ClaDz0YR.js +0 -1
  206. package/dist/web/assets/Data-jSFgAfej.js +0 -6
  207. package/dist/web/assets/Desktop-BofKeLVf.js +0 -1
  208. package/dist/web/assets/DesktopReview--WjeZh3w.js +0 -1
  209. package/dist/web/assets/Evidence-CJNzSQpY.js +0 -1
  210. package/dist/web/assets/Explore-BdFvqgF4.js +0 -2
  211. package/dist/web/assets/Features-CIBbw6PG.js +0 -1
  212. package/dist/web/assets/Flags-B62v4uWR.js +0 -2
  213. package/dist/web/assets/Flaky-Cut1kZw6.js +0 -1
  214. package/dist/web/assets/Impact-jOSl5Q0k.js +0 -3
  215. package/dist/web/assets/Jobs-DMJGgWtQ.js +0 -5
  216. package/dist/web/assets/KindPage-BbQWH5wa.js +0 -6
  217. package/dist/web/assets/Migration-BBgv7xXo.js +0 -2
  218. package/dist/web/assets/PageAgent-txbNoP6u.js +0 -1
  219. package/dist/web/assets/Product-BrXH81Ns.js +0 -7
  220. package/dist/web/assets/Production-CCVtFNGQ.js +0 -1
  221. package/dist/web/assets/Quality-Dxh-60A8.js +0 -1
  222. package/dist/web/assets/Readiness-DyJvSOLN.js +0 -1
  223. package/dist/web/assets/Record-Dnlkimjb.js +0 -1
  224. package/dist/web/assets/Regression-D2DDTwzs.js +0 -5
  225. package/dist/web/assets/Reports-ClcY7M0Q.js +0 -2
  226. package/dist/web/assets/Response-D9FYUvHg.js +0 -9
  227. package/dist/web/assets/RunDiff-CNImaEdz.js +0 -1
  228. package/dist/web/assets/Runs-CFvmdULI.js +0 -2
  229. package/dist/web/assets/Steps-BS66s0E1.js +0 -2
  230. package/dist/web/assets/TestCases-CrQEUtfD.js +0 -1
  231. package/dist/web/assets/TestData-e3IX0xwG.js +0 -2
  232. package/dist/web/assets/TestDebt-tXPoexMF.js +0 -1
  233. package/dist/web/assets/TestManagement-wjGaoZzI.js +0 -1
  234. package/dist/web/assets/Tosca-C5YaMLS0.js +0 -3
  235. package/dist/web/assets/WhatsNew-CwnRbDnd.js +0 -1
  236. package/dist/web/assets/azuredevops-BcQ5AFOM.js +0 -1
  237. package/dist/web/assets/crew-CWfjZIxE.js +0 -1
  238. package/dist/web/assets/families-DWilSDct.js +0 -1
  239. package/dist/web/assets/filters-CVzIOjPG.js +0 -1
  240. package/dist/web/assets/fold-tvLGnxD1.js +0 -1
  241. package/dist/web/assets/frame-Deu1IqzV.js +0 -13
  242. package/dist/web/assets/index-BWMIKyPB.js +0 -76
  243. package/dist/web/assets/index-C2Yq55oT.css +0 -2
  244. package/dist/web/assets/line-icons-C_amZ5-o.js +0 -1
  245. package/dist/web/assets/logos-C1NBtBMc.js +0 -1
  246. package/dist/web/assets/logos-DFyhMw0i.js +0 -1
  247. package/dist/web/assets/markdown-DC2HA0yZ.js +0 -10
  248. package/dist/web/assets/paletteCommands-Qxm5DZIs.js +0 -1
  249. package/dist/web/assets/parts-BR6dUwqn.js +0 -1
  250. package/dist/web/assets/productParts-BxdHuSBa.js +0 -1
  251. package/dist/web/assets/qualityParts-lz6eYVxC.js +0 -1
  252. package/dist/web/assets/recordTest-CcplpTS6.js +0 -1
  253. package/dist/web/assets/today-DuQFapJM.js +0 -1
  254. package/dist/web/assets/when-CHnpLdYw.js +0 -1
@@ -0,0 +1,317 @@
1
+ # Required Field Feedback
2
+
3
+ ## The Problem
4
+ Marking required fields with an error state immediately upon page load can be confusing. Ideally, a required field should only look "invalid" if the user has attempted to fill it out and failed.
5
+
6
+ ## The Solution
7
+ The `:user-invalid` pseudo-class solves this perfectly. For a required field, it will not match on page load. It will only match if:
8
+ 1. The user interacts with the field (e.g., types a character and deletes it) and then leaves it (blur), leaving it empty.
9
+ 2. The user attempts to submit the form while the field is empty.
10
+
11
+ ### Implementation Strategy
12
+
13
+ 1. **HTML Constraint**: Add the `required` attribute to your inputs.
14
+ 2. **Visual Feedback**: Use `:user-invalid` to style the border red and show a "Required" helper text.
15
+ 3. **Timing**: Rely on the browser's native timing for visual feedback. You don't need `onBlur` handlers to add a `touched` class anymore, though some JavaScript is still needed to sync ARIA attributes (see below).
16
+ 4. **Error Text**: Show visible error text with the error styling, so the error isn't shown by color alone. Start each message with an error icon that has a text alternative such as "Error" (the safest choice), or word every message as an error, for example "Name is required.", and use the same approach for every error in the form.
17
+ 5. **Error Link**: List the error message in the field's `aria-describedby` only while the field is invalid, so screen readers read it with the field. A reference in the markup would read the hidden message from page load. The script in section 3 does this for each field whose `data-error` attribute is set to its error message's `id`.
18
+
19
+ ## Implementation Guide
20
+
21
+ ### 1. HTML Structure
22
+ ```html
23
+ <form id="feedback-form">
24
+ <div class="field">
25
+ <label for="full-name">Full Name</label>
26
+ <!-- Set data-error to the error message's id. The aria-invalid script lists that id in aria-describedby while the field is invalid. -->
27
+ <input
28
+ type="text"
29
+ id="full-name"
30
+ name="full-name"
31
+ required
32
+ data-error="name-error"
33
+ >
34
+ <!-- MANDATORY: Include an icon or distinct non-color indicator alongside error text -->
35
+ <div id="name-error" class="error-msg">
36
+ <span role="img" aria-label="Error">❌</span> This field is required.
37
+ </div>
38
+ </div>
39
+ </form>
40
+ ```
41
+
42
+ ### 2. CSS
43
+ ```css
44
+ .error-msg {
45
+ display: none;
46
+ color: #d93025;
47
+ font-size: 0.875rem;
48
+ margin-top: 0.25rem;
49
+ }
50
+
51
+ /*
52
+ Only highlight empty required fields AFTER the user interacts with them or attempts submission.
53
+ MANDATORY: Provide multiple indicators (border shift + helper text/icon) to avoid color-only state communication.
54
+ */
55
+ input:user-invalid {
56
+ border-color: #d93025;
57
+ background-color: #fce8e6;
58
+ }
59
+
60
+ input:user-invalid + .error-msg {
61
+ display: block;
62
+ }
63
+
64
+ /* Optional: Subtle indicator for required fields that are valid */
65
+ input:required:user-valid {
66
+ border-color: #188038;
67
+ border-width: 2px;
68
+ }
69
+ ```
70
+
71
+ ### 3. JavaScript State Synchronization
72
+
73
+ MANDATORY: Because `:user-invalid` is a visual state, you MUST provide a JavaScript bridge to sync `aria-invalid="true"` dynamically for assistive technologies when a user blurs an invalid field or attempts submission, deriving it from `:user-invalid`, not `checkValidity()`, which is already false when a user tabs through an untouched field.
74
+
75
+ Native `:user-invalid` does not automatically sync with ARIA attributes. Add the following JavaScript to keep `aria-invalid` in sync with the visual state:
76
+
77
+ * Set `aria-invalid="false"` until `:user-invalid` matches, rather than leaving it unset. Firefox and Safari expose an empty `required` field as invalid from page load, and Chromium doesn't expose an empty `required` field as invalid after interaction unless `aria-invalid="true"` is set.
78
+ * Link each field to its error message by setting the field's `data-error` attribute to the error message's `id` (`data-error="email-error"` for `<div id="email-error">`), and let the script list that `id` in `aria-describedby` only while the field is invalid. Don't reference the error from `aria-describedby` in the markup: the error element is always in the page, and text that `aria-describedby` references is announced even when it's hidden.
79
+ * Announce an error that appears when the user leaves or changes a field through one polite live region for the page, a moment later so it doesn't talk over the next field. Don't make each error message a live region: a live region that is shown, rather than changed, isn't announced reliably. After a failed submit, move focus to the first invalid field so that its error is announced instead.
80
+
81
+ ```javascript
82
+ // List the field's error message (the id in data-error) in aria-describedby only while
83
+ // it's shown: text that aria-describedby references is announced even when it's hidden.
84
+ const linkError = (el, shown) => {
85
+ const errorId = el.dataset.error;
86
+ if (!errorId) return;
87
+ const ids = (el.getAttribute('aria-describedby') || '').split(/\s+/).filter((id) => id && id !== errorId);
88
+ if (shown) ids.push(errorId);
89
+ if (ids.length) el.setAttribute('aria-describedby', ids.join(' '));
90
+ else el.removeAttribute('aria-describedby');
91
+ };
92
+
93
+ // One polite live region for the page announces an error that appears when the user
94
+ // leaves or changes a field. Run this once the form is in the page.
95
+ const announcer = document.createElement('div');
96
+ announcer.setAttribute('aria-live', 'polite');
97
+ announcer.classList.add('visually-hidden');
98
+ document.body.append(announcer);
99
+ let announceTimer;
100
+ let announcedField;
101
+
102
+ // Text as a screen reader reads it: icons' text alternatives in, aria-hidden text out.
103
+ const spokenText = (node) => {
104
+ const copy = node.cloneNode(true);
105
+ copy.querySelectorAll('[aria-hidden="true"]').forEach((n) => n.remove());
106
+ copy.querySelectorAll('[role="img"][aria-label]').forEach((n) => n.replaceWith(`${n.getAttribute('aria-label')}: `));
107
+ return copy.textContent.replace(/\s+/g, ' ').trim();
108
+ };
109
+ const announceError = (el) => {
110
+ const error = document.getElementById(el.dataset.error);
111
+ if (!error) return;
112
+ const label = el.labels?.[0] ? `${spokenText(el.labels[0])}: ` : '';
113
+ clearTimeout(announceTimer);
114
+ announcer.textContent = '';
115
+ announcedField = el;
116
+ // Wait until the screen reader has announced the field that receives focus next.
117
+ announceTimer = setTimeout(() => { announcer.textContent = label + spokenText(error); }, 500);
118
+ };
119
+
120
+ // Sync aria-invalid with the CSS :user-invalid state. Only form fields are synced, and
121
+ // an aria-invalid="true" that this script didn't set (for example from a server check)
122
+ // is left alone.
123
+ const flagged = new WeakSet();
124
+ // Fields whose current error has been announced, or read out by focus after a failed
125
+ // submit. A field can become invalid while the user types, so this is tracked separately.
126
+ const announced = new WeakSet();
127
+ const syncAria = (el, announce = false) => {
128
+ if (!el.matches?.('input, select, textarea')) return;
129
+ const invalid = el.matches(':user-invalid');
130
+ if (invalid) {
131
+ if (announce && !announced.has(el)) {
132
+ announceError(el);
133
+ announced.add(el);
134
+ }
135
+ el.setAttribute('aria-invalid', 'true');
136
+ linkError(el, true);
137
+ flagged.add(el);
138
+ } else if (flagged.has(el) || el.getAttribute('aria-invalid') !== 'true') {
139
+ el.setAttribute('aria-invalid', 'false');
140
+ linkError(el, false);
141
+ flagged.delete(el);
142
+ announced.delete(el);
143
+ // Clear a fixed field's announcement so it isn't found later when reading the page.
144
+ if (announcedField === el) {
145
+ clearTimeout(announceTimer);
146
+ announcer.textContent = '';
147
+ }
148
+ }
149
+ };
150
+
151
+ // Start every field at aria-invalid="false".
152
+ document.querySelectorAll('input, select, textarea').forEach((el) => syncAria(el));
153
+
154
+ // Update on blur (to show and announce an error) and input (to clear it)
155
+ document.addEventListener('blur', (e) => syncAria(e.target, true), true);
156
+ document.addEventListener('input', (e) => {
157
+ if (e.target.hasAttribute('aria-invalid')) syncAria(e.target);
158
+ });
159
+
160
+ // Checkboxes, radio buttons and other controls that commit on 'change' can become
161
+ // :user-invalid without losing focus, so update on change too.
162
+ document.addEventListener('change', (e) => syncAria(e.target, true), true);
163
+
164
+ // A failed submit fires 'invalid' on each failing field, including required fields the
165
+ // user never touched, so update those too. 'invalid' doesn't bubble. Focus moving to the
166
+ // first invalid field announces its error, so these aren't announced.
167
+ document.addEventListener('invalid', (e) => {
168
+ announced.add(e.target);
169
+ syncAria(e.target);
170
+ }, true);
171
+
172
+ // Reset clears :user-invalid after the 'reset' event, so update each field afterwards.
173
+ document.addEventListener('reset', (e) => {
174
+ setTimeout(() => [...e.target.elements].forEach((el) => syncAria(el)));
175
+ }, true);
176
+ ```
177
+
178
+ Hide the live region with the `.visually-hidden` utility:
179
+
180
+ ```css
181
+ /* Hides content visually but keeps it in the accessibility tree */
182
+ .visually-hidden:where(:not(:focus-within, :active)) {
183
+ position: absolute !important;
184
+ clip-path: inset(50%) !important;
185
+ overflow: hidden !important;
186
+ width: 1px !important;
187
+ height: 1px !important;
188
+ margin: -1px !important;
189
+ padding: 0 !important;
190
+ border: 0 !important;
191
+ white-space: nowrap !important;
192
+ }
193
+ ```
194
+
195
+ ## Fallbacking & Browser Support
196
+
197
+ ### Fallbacks & browser support for :user-valid and :user-invalid
198
+
199
+ Baseline status for :user-valid and :user-invalid: Widely available. It's been Baseline since 2023-11-02.
200
+ Supported by: Chrome 119 (Oct 2023), Edge 119 (Nov 2023), Firefox 88 (Apr 2021), and Safari 16.5 (May 2023).
201
+
202
+ ### CSS for Fallback
203
+
204
+ ```css
205
+ /* Applies to every field that can be invalid (input, select, textarea). :is() keeps the
206
+ rule working where :user-invalid isn't supported: in a plain selector list, one
207
+ unsupported selector drops the whole rule. */
208
+ :is(:user-invalid, .user-invalid-fallback) {
209
+ border-color: #d93025;
210
+ background-color: #fce8e6;
211
+ }
212
+
213
+ :is(:user-invalid, .user-invalid-fallback) + .error-msg {
214
+ display: block;
215
+ }
216
+ ```
217
+
218
+ ### JavaScript Fallback
219
+
220
+ Use a reusable utility that tracks interaction state using a `WeakMap`. This avoids polluting the DOM with "dirty" classes or data attributes.
221
+
222
+ ```javascript
223
+ const UserInvalidFallback = (() => {
224
+ const dirtyState = new WeakMap();
225
+
226
+ const updateState = (input) => {
227
+ // validity.valid gives the current state without firing an 'invalid' event, as checkValidity() does.
228
+ const isValid = input.validity.valid;
229
+
230
+ // Update both visual and ARIA state
231
+ input.classList.toggle('user-invalid-fallback', !isValid);
232
+ input.classList.toggle('user-valid-fallback', isValid);
233
+
234
+ input.setAttribute('aria-invalid', isValid ? 'false' : 'true');
235
+ linkError(input, !isValid);
236
+ };
237
+
238
+ // List the error message (the id in data-error) in aria-describedby only while it's
239
+ // shown: text that aria-describedby references is announced even when it's hidden.
240
+ const linkError = (input, shown) => {
241
+ const errorId = input.dataset.error;
242
+ if (!errorId) return;
243
+ const ids = (input.getAttribute('aria-describedby') || '').split(/\s+/).filter((id) => id && id !== errorId);
244
+ if (shown) ids.push(errorId);
245
+ if (ids.length) input.setAttribute('aria-describedby', ids.join(' '));
246
+ else input.removeAttribute('aria-describedby');
247
+ };
248
+
249
+ const handleEvent = (event) => {
250
+ const input = event.target;
251
+
252
+ if (event.type === 'reset') {
253
+ const controls = input.elements || [];
254
+ for (const control of controls) {
255
+ dirtyState.delete(control);
256
+ control.classList.remove('user-invalid-fallback');
257
+ control.classList.remove('user-valid-fallback');
258
+ if (control.matches('input, select, textarea')) control.setAttribute('aria-invalid', 'false');
259
+ if (control.dataset?.error) linkError(control, false);
260
+ }
261
+ return;
262
+ }
263
+
264
+ if (!input.checkValidity) return;
265
+
266
+ // A submit attempt counts as interaction: the browser fires 'invalid' on each failing
267
+ // field, including required fields the user never touched, so flag them all.
268
+ if (event.type === 'invalid') {
269
+ dirtyState.set(input, { hasInteracted: true, hasBlurred: true });
270
+ updateState(input);
271
+ return;
272
+ }
273
+
274
+ if (event.type === 'input' || event.type === 'change') {
275
+ const state = dirtyState.get(input) || { hasInteracted: false, hasBlurred: false };
276
+ state.hasInteracted = true;
277
+ dirtyState.set(input, state);
278
+ if (state.hasBlurred) {
279
+ updateState(input);
280
+ }
281
+ } else if (event.type === 'blur') {
282
+ const state = dirtyState.get(input) || { hasInteracted: false, hasBlurred: false };
283
+ state.hasBlurred = true;
284
+ dirtyState.set(input, state);
285
+ if (state.hasInteracted) {
286
+ updateState(input);
287
+ }
288
+ }
289
+ };
290
+
291
+ const init = (root = document) => {
292
+ if (CSS.supports('selector(:user-invalid)')) return;
293
+
294
+ // Firefox and Safari expose an empty required field as invalid from page load.
295
+ root.querySelectorAll('input, select, textarea').forEach((el) => {
296
+ if (!el.hasAttribute('aria-invalid')) el.setAttribute('aria-invalid', 'false');
297
+ });
298
+
299
+ root.addEventListener('blur', handleEvent, true); // Capture phase
300
+ root.addEventListener('input', handleEvent);
301
+ root.addEventListener('change', handleEvent);
302
+ root.addEventListener('invalid', handleEvent, true); // invalid doesn't bubble
303
+ root.addEventListener('reset', handleEvent, true); // Capture resets
304
+ };
305
+
306
+ return { init };
307
+ })();
308
+
309
+ // Initialize for a specific form
310
+ const form = document.querySelector('#demo-form');
311
+ UserInvalidFallback.init(form);
312
+ ```
313
+
314
+ ## Other Considerations
315
+
316
+ 1. **Asterisks**: It is still best practice to indicate required fields visually (e.g., with an asterisk `*`) in the label, so users know what to expect *before* they interact. Explain the asterisk once before the form (for example, "Fields marked * are required."), and wrap it in `<span aria-hidden="true">*</span>`, because the `required` attribute already makes screen readers announce "required".
317
+ 2. **Submit Buttons**: Unlike `disabled` buttons, keep your submit button enabled. If the user clicks it, the browser will automatically trigger `:user-invalid` on all empty required fields and focus the first one. This is excellent for accessibility and UX.
@@ -0,0 +1,310 @@
1
+ # Select Menu Interaction
2
+
3
+ ## The Problem
4
+ For mandatory dropdowns (e.g., "Choose a Country"), standard validation flags the field as invalid immediately if the default option has an empty value. This can create visual noise. We want to show the error only after the user has interacted with the menu and left it without choosing an option, or attempts to submit the form without choosing one.
5
+
6
+ ## The Solution
7
+ The `:user-invalid` pseudo-class works seamlessly with `<select>` elements. It respects the user's interaction flow: simply loading the page or focusing/blurring without making a change doesn't count as an interaction, so the field stays neutral until they actively attempt a selection.
8
+
9
+ ### Implementation Strategy
10
+
11
+ 1. **HTML Constraint**: Use a `<select>` with `required`. The first option should have `value=""` and ideally be disabled/hidden to force a valid choice.
12
+ 2. **Visual Feedback**: Use `:user-invalid` to style the select box border.
13
+ 3. **Timing**: The browser considers the field "interacted" if the user changes the value (even back to the default invalid state) before they blur the control, or upon form submission. Some browsers also count opening and closing the menu without choosing an option.
14
+ 4. **Error Link**: List the error message in the select's `aria-describedby` only while the select is invalid, so screen readers read it with the select. A reference in the markup would read the hidden message from page load. The script in "Accessibility" under Other Considerations does this for each field whose `data-error` attribute is set to its error message's `id`.
15
+
16
+ ## Implementation Guide
17
+
18
+ ### 1. HTML Structure
19
+ The "placeholder" option is key here.
20
+
21
+ ```html
22
+ <form>
23
+ <div class="field">
24
+ <label for="country">Country</label>
25
+ <!-- Set data-error to the error message's id. The aria-invalid script lists that id in aria-describedby while the select is invalid. -->
26
+ <select
27
+ id="country"
28
+ name="country"
29
+ required
30
+ data-error="country-error"
31
+ >
32
+ <option value="" disabled selected>Select a country...</option>
33
+ <option value="us">United States</option>
34
+ <option value="ca">Canada</option>
35
+ <option value="uk">United Kingdom</option>
36
+ </select>
37
+ <div id="country-error" class="error-msg">
38
+ <span role="img" aria-label="Error">❌</span> Please select a country.
39
+ </div>
40
+ </div>
41
+ </form>
42
+ ```
43
+
44
+ ### 2. CSS
45
+ ```css
46
+ .error-msg {
47
+ display: none;
48
+ color: #d93025;
49
+ font-size: 0.875rem;
50
+ margin-top: 0.25rem;
51
+ }
52
+
53
+ /*
54
+ Only show error after the user visits the select menu.
55
+ */
56
+ select:user-invalid {
57
+ border-color: #d93025;
58
+ background-color: #fce8e6;
59
+ }
60
+
61
+ select:user-invalid + .error-msg {
62
+ display: block;
63
+ }
64
+
65
+ select:user-valid {
66
+ border-color: #188038;
67
+ }
68
+ ```
69
+
70
+ ## Fallbacking & Browser Support
71
+
72
+ ### Fallbacks & browser support for :user-valid and :user-invalid
73
+
74
+ Baseline status for :user-valid and :user-invalid: Widely available. It's been Baseline since 2023-11-02.
75
+ Supported by: Chrome 119 (Oct 2023), Edge 119 (Nov 2023), Firefox 88 (Apr 2021), and Safari 16.5 (May 2023).
76
+
77
+ ### CSS for Fallback
78
+
79
+ ```css
80
+ /* Applies to every field that can be invalid (input, select, textarea). :is() keeps the
81
+ rule working where :user-invalid isn't supported: in a plain selector list, one
82
+ unsupported selector drops the whole rule. */
83
+ :is(:user-invalid, .user-invalid-fallback) {
84
+ border-color: #d93025;
85
+ background-color: #fce8e6;
86
+ }
87
+
88
+ :is(:user-invalid, .user-invalid-fallback) + .error-msg {
89
+ display: block;
90
+ }
91
+ ```
92
+
93
+ ### JavaScript Fallback
94
+
95
+ Use a reusable utility that tracks interaction state using a `WeakMap`. This avoids polluting the DOM with "dirty" classes or data attributes.
96
+
97
+ ```javascript
98
+ const UserInvalidFallback = (() => {
99
+ const dirtyState = new WeakMap();
100
+
101
+ const updateState = (input) => {
102
+ // validity.valid gives the current state without firing an 'invalid' event, as checkValidity() does.
103
+ const isValid = input.validity.valid;
104
+
105
+ // Update both visual and ARIA state
106
+ input.classList.toggle('user-invalid-fallback', !isValid);
107
+ input.classList.toggle('user-valid-fallback', isValid);
108
+
109
+ input.setAttribute('aria-invalid', isValid ? 'false' : 'true');
110
+ linkError(input, !isValid);
111
+ };
112
+
113
+ // List the error message (the id in data-error) in aria-describedby only while it's
114
+ // shown: text that aria-describedby references is announced even when it's hidden.
115
+ const linkError = (input, shown) => {
116
+ const errorId = input.dataset.error;
117
+ if (!errorId) return;
118
+ const ids = (input.getAttribute('aria-describedby') || '').split(/\s+/).filter((id) => id && id !== errorId);
119
+ if (shown) ids.push(errorId);
120
+ if (ids.length) input.setAttribute('aria-describedby', ids.join(' '));
121
+ else input.removeAttribute('aria-describedby');
122
+ };
123
+
124
+ const handleEvent = (event) => {
125
+ const input = event.target;
126
+
127
+ if (event.type === 'reset') {
128
+ const controls = input.elements || [];
129
+ for (const control of controls) {
130
+ dirtyState.delete(control);
131
+ control.classList.remove('user-invalid-fallback');
132
+ control.classList.remove('user-valid-fallback');
133
+ if (control.matches('input, select, textarea')) control.setAttribute('aria-invalid', 'false');
134
+ if (control.dataset?.error) linkError(control, false);
135
+ }
136
+ return;
137
+ }
138
+
139
+ if (!input.checkValidity) return;
140
+
141
+ // A submit attempt counts as interaction: the browser fires 'invalid' on each failing
142
+ // field, including required fields the user never touched, so flag them all.
143
+ if (event.type === 'invalid') {
144
+ dirtyState.set(input, { hasInteracted: true, hasBlurred: true });
145
+ updateState(input);
146
+ return;
147
+ }
148
+
149
+ if (event.type === 'input' || event.type === 'change') {
150
+ const state = dirtyState.get(input) || { hasInteracted: false, hasBlurred: false };
151
+ state.hasInteracted = true;
152
+ dirtyState.set(input, state);
153
+ if (state.hasBlurred) {
154
+ updateState(input);
155
+ }
156
+ } else if (event.type === 'blur') {
157
+ const state = dirtyState.get(input) || { hasInteracted: false, hasBlurred: false };
158
+ state.hasBlurred = true;
159
+ dirtyState.set(input, state);
160
+ if (state.hasInteracted) {
161
+ updateState(input);
162
+ }
163
+ }
164
+ };
165
+
166
+ const init = (root = document) => {
167
+ if (CSS.supports('selector(:user-invalid)')) return;
168
+
169
+ // Firefox and Safari expose an empty required field as invalid from page load.
170
+ root.querySelectorAll('input, select, textarea').forEach((el) => {
171
+ if (!el.hasAttribute('aria-invalid')) el.setAttribute('aria-invalid', 'false');
172
+ });
173
+
174
+ root.addEventListener('blur', handleEvent, true); // Capture phase
175
+ root.addEventListener('input', handleEvent);
176
+ root.addEventListener('change', handleEvent);
177
+ root.addEventListener('invalid', handleEvent, true); // invalid doesn't bubble
178
+ root.addEventListener('reset', handleEvent, true); // Capture resets
179
+ };
180
+
181
+ return { init };
182
+ })();
183
+
184
+ // Initialize for a specific form
185
+ const form = document.querySelector('#demo-form');
186
+ UserInvalidFallback.init(form);
187
+ ```
188
+
189
+ ## Other Considerations
190
+
191
+ 1. **Mobile behavior**: On mobile devices, "blur" might happen differently depending on the OS picker. Testing on actual devices is recommended.
192
+ 2. **Accessibility**: Native `:user-invalid` does not automatically sync with ARIA attributes. Add the following JavaScript to keep `aria-invalid` in sync with the visual state:
193
+
194
+ * Set `aria-invalid="false"` until `:user-invalid` matches, rather than leaving it unset. Firefox and Safari expose an empty `required` field as invalid from page load, and Chromium doesn't expose an empty `required` field as invalid after interaction unless `aria-invalid="true"` is set.
195
+ * Link each field to its error message by setting the field's `data-error` attribute to the error message's `id` (`data-error="email-error"` for `<div id="email-error">`), and let the script list that `id` in `aria-describedby` only while the field is invalid. Don't reference the error from `aria-describedby` in the markup: the error element is always in the page, and text that `aria-describedby` references is announced even when it's hidden.
196
+ * Announce an error that appears when the user leaves or changes a field through one polite live region for the page, a moment later so it doesn't talk over the next field. Don't make each error message a live region: a live region that is shown, rather than changed, isn't announced reliably. After a failed submit, move focus to the first invalid field so that its error is announced instead.
197
+
198
+ ```javascript
199
+ // List the field's error message (the id in data-error) in aria-describedby only while
200
+ // it's shown: text that aria-describedby references is announced even when it's hidden.
201
+ const linkError = (el, shown) => {
202
+ const errorId = el.dataset.error;
203
+ if (!errorId) return;
204
+ const ids = (el.getAttribute('aria-describedby') || '').split(/\s+/).filter((id) => id && id !== errorId);
205
+ if (shown) ids.push(errorId);
206
+ if (ids.length) el.setAttribute('aria-describedby', ids.join(' '));
207
+ else el.removeAttribute('aria-describedby');
208
+ };
209
+
210
+ // One polite live region for the page announces an error that appears when the user
211
+ // leaves or changes a field. Run this once the form is in the page.
212
+ const announcer = document.createElement('div');
213
+ announcer.setAttribute('aria-live', 'polite');
214
+ announcer.classList.add('visually-hidden');
215
+ document.body.append(announcer);
216
+ let announceTimer;
217
+ let announcedField;
218
+
219
+ // Text as a screen reader reads it: icons' text alternatives in, aria-hidden text out.
220
+ const spokenText = (node) => {
221
+ const copy = node.cloneNode(true);
222
+ copy.querySelectorAll('[aria-hidden="true"]').forEach((n) => n.remove());
223
+ copy.querySelectorAll('[role="img"][aria-label]').forEach((n) => n.replaceWith(`${n.getAttribute('aria-label')}: `));
224
+ return copy.textContent.replace(/\s+/g, ' ').trim();
225
+ };
226
+ const announceError = (el) => {
227
+ const error = document.getElementById(el.dataset.error);
228
+ if (!error) return;
229
+ const label = el.labels?.[0] ? `${spokenText(el.labels[0])}: ` : '';
230
+ clearTimeout(announceTimer);
231
+ announcer.textContent = '';
232
+ announcedField = el;
233
+ // Wait until the screen reader has announced the field that receives focus next.
234
+ announceTimer = setTimeout(() => { announcer.textContent = label + spokenText(error); }, 500);
235
+ };
236
+
237
+ // Sync aria-invalid with the CSS :user-invalid state. Only form fields are synced, and
238
+ // an aria-invalid="true" that this script didn't set (for example from a server check)
239
+ // is left alone.
240
+ const flagged = new WeakSet();
241
+ // Fields whose current error has been announced, or read out by focus after a failed
242
+ // submit. A field can become invalid while the user types, so this is tracked separately.
243
+ const announced = new WeakSet();
244
+ const syncAria = (el, announce = false) => {
245
+ if (!el.matches?.('input, select, textarea')) return;
246
+ const invalid = el.matches(':user-invalid');
247
+ if (invalid) {
248
+ if (announce && !announced.has(el)) {
249
+ announceError(el);
250
+ announced.add(el);
251
+ }
252
+ el.setAttribute('aria-invalid', 'true');
253
+ linkError(el, true);
254
+ flagged.add(el);
255
+ } else if (flagged.has(el) || el.getAttribute('aria-invalid') !== 'true') {
256
+ el.setAttribute('aria-invalid', 'false');
257
+ linkError(el, false);
258
+ flagged.delete(el);
259
+ announced.delete(el);
260
+ // Clear a fixed field's announcement so it isn't found later when reading the page.
261
+ if (announcedField === el) {
262
+ clearTimeout(announceTimer);
263
+ announcer.textContent = '';
264
+ }
265
+ }
266
+ };
267
+
268
+ // Start every field at aria-invalid="false".
269
+ document.querySelectorAll('input, select, textarea').forEach((el) => syncAria(el));
270
+
271
+ // Update on blur (to show and announce an error) and input (to clear it)
272
+ document.addEventListener('blur', (e) => syncAria(e.target, true), true);
273
+ document.addEventListener('input', (e) => {
274
+ if (e.target.hasAttribute('aria-invalid')) syncAria(e.target);
275
+ });
276
+
277
+ // Checkboxes, radio buttons and other controls that commit on 'change' can become
278
+ // :user-invalid without losing focus, so update on change too.
279
+ document.addEventListener('change', (e) => syncAria(e.target, true), true);
280
+
281
+ // A failed submit fires 'invalid' on each failing field, including required fields the
282
+ // user never touched, so update those too. 'invalid' doesn't bubble. Focus moving to the
283
+ // first invalid field announces its error, so these aren't announced.
284
+ document.addEventListener('invalid', (e) => {
285
+ announced.add(e.target);
286
+ syncAria(e.target);
287
+ }, true);
288
+
289
+ // Reset clears :user-invalid after the 'reset' event, so update each field afterwards.
290
+ document.addEventListener('reset', (e) => {
291
+ setTimeout(() => [...e.target.elements].forEach((el) => syncAria(el)));
292
+ }, true);
293
+ ```
294
+
295
+ Hide the live region with the `.visually-hidden` utility:
296
+
297
+ ```css
298
+ /* Hides content visually but keeps it in the accessibility tree */
299
+ .visually-hidden:where(:not(:focus-within, :active)) {
300
+ position: absolute !important;
301
+ clip-path: inset(50%) !important;
302
+ overflow: hidden !important;
303
+ width: 1px !important;
304
+ height: 1px !important;
305
+ margin: -1px !important;
306
+ padding: 0 !important;
307
+ border: 0 !important;
308
+ white-space: nowrap !important;
309
+ }
310
+ ```