inclusive-elements 0.5.5 → 0.6.1

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,367 @@
1
+ # Changelog
2
+
3
+ ### [0.6.1](https://github.com/tobyzerner/inclusive-elements/compare/v0.6.0...v0.6.1) (2026-03-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **demo:** hide reactions menu ([df0afa8](https://github.com/tobyzerner/inclusive-elements/commit/df0afa896688cf342f7c3d7808296f881aaaa1a7))
9
+ * **menu:** return focus to root trigger on Escape and Tab ([9c9b28a](https://github.com/tobyzerner/inclusive-elements/commit/9c9b28ae181f42efd76abc10809ac1f4a7a6c9e6))
10
+ * **tabs:** prevent attribute observer loop ([48e2043](https://github.com/tobyzerner/inclusive-elements/commit/48e2043350267b3fc7aa7b649b235d74d25cbc07))
11
+
12
+ ## [0.6.0](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.5...v0.6.0) (2026-03-23)
13
+
14
+ ### Overview
15
+
16
+ This beta moves the library further toward a platform-native shape. Instead of treating every pattern as a runtime widget, `inclusive-elements` now combines:
17
+
18
+ - native-first pattern guidance where the platform already provides the right primitives
19
+ - focused custom elements for the patterns that still need runtime coordination
20
+
21
+ The runtime surface is now centered on `ui-alerts`, `ui-menu`, `ui-tabs`, `ui-toolbar`, and `ui-tooltip`, while the other patterns are documented as native recommendations.
22
+
23
+ ### Breaking Changes
24
+
25
+ - `modal` has been removed as a runtime custom element. Use the native `<dialog>` pattern instead.
26
+ - `popup` has been removed as a runtime custom element. Use the native Popover API pattern instead.
27
+ - `accordion` is now documented as a native pattern based on grouped `<details name>`, not shipped as a runtime custom element.
28
+ - `disclosure` is now documented as a native pattern based on `<details>` and `<summary>`, not shipped as a runtime custom element.
29
+
30
+ ### Component Changes
31
+
32
+ - **alerts:** clarified and simplified the alert stack behavior around announcement politeness, timing, replacement by key, and styling hooks for enter, leave, and move transitions.
33
+ - **menu:** rebuilt around native popovers with managed menu semantics, root-trigger keyboard opening, submenu coordination, typeahead, horizontal menu support, and clearer trigger ownership rules.
34
+ - **tabs:** simplified the internal structure syncing, kept selection and panel relationships normalized from the DOM, and tightened keyboard, panel visibility, and managed `tabindex` behavior.
35
+ - **toolbar:** aligned the toolbar around a single-tab-stop roving focus model with automatic syncing when controls are added, removed, hidden, or disabled.
36
+ - **tooltip:** moved to a native hint-popover model with explicit or adjacent-sibling owner resolution, managed `aria-describedby`, disabled-owner handling, and cleaner focus and hover interaction rules.
37
+
38
+ ### Documentation
39
+
40
+ - Reworked the component READMEs into a more consistent format with clearer behavior sections, platform requirement notes, and updated examples.
41
+ - Added native-first guidance for `accordion`, `disclosure`, `dialog`, and `popover`.
42
+
43
+ ### Tooling
44
+
45
+ - Add automated test suites around core functionality for `alerts`, `menu`, `tabs`, `toolbar`, and `tooltip`.
46
+
47
+ ### [0.5.5](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.4...v0.5.5) (2026-03-16)
48
+
49
+
50
+ ### Features
51
+
52
+ * **menu:** add support for horizontal menus ([ec720f9](https://github.com/tobyzerner/inclusive-elements/commit/ec720f9ac965804a3a5dc084647824715a8c7ebd))
53
+ * **tooltip:** handle arrow keys as tooltip focus triggers ([b50b49b](https://github.com/tobyzerner/inclusive-elements/commit/b50b49be1256e555d55cd0e7ce5780b933f62717))
54
+
55
+ ### [0.5.4](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.3...v0.5.4) (2026-02-20)
56
+
57
+
58
+ ### Features
59
+
60
+ * **tabs:** add `selectTab()` to programmatically select tabs ([f9599c8](https://github.com/tobyzerner/inclusive-elements/commit/f9599c81c77c8766697cf3df4f05dcb8833f870a))
61
+
62
+ ### [0.5.3](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.2...v0.5.3) (2026-02-19)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * **tabs:** ensure correct initial tab is selected when none are `aria-selected` ([c127943](https://github.com/tobyzerner/inclusive-elements/commit/c127943f2c15801409f4bbb91b4e0c71028f4fc1))
68
+
69
+ ### [0.5.2](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.1...v0.5.2) (2026-02-18)
70
+
71
+
72
+ ### Features
73
+
74
+ * **tabs:** dispatch `change` event on tab selection changes ([a1ba27b](https://github.com/tobyzerner/inclusive-elements/commit/a1ba27b715b3f9210f8c890a7cc6ddad041735b1))
75
+ * **tabs:** select initial tab based on `aria-selected` attribute ([9b4639a](https://github.com/tobyzerner/inclusive-elements/commit/9b4639a431a6fc5a67e173c1a931f9989ee8a7b7))
76
+
77
+ ### [0.5.1](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.0...v0.5.1) (2026-01-25)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * **popup:** remove stopPropagation from `menuitem` clicks ([7cbe32a](https://github.com/tobyzerner/inclusive-elements/commit/7cbe32a675b07dad248ba518354f722c84eaf22c))
83
+
84
+ ## [0.5.0](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.0-beta.3...v0.5.0) (2026-01-18)
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * **tooltip:** prevent tooltips showing due to mouse emulation events on touch devices ([0582447](https://github.com/tobyzerner/inclusive-elements/commit/0582447d5f1f610a9d84ba56a3642dd8ff3ef8c1))
90
+
91
+ ## [0.5.0-beta.3](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.0-beta.2...v0.5.0-beta.3) (2025-09-27)
92
+
93
+
94
+ ### Features
95
+
96
+ * **popup:** allow popup to initialize with `open` attribute ([e2e8483](https://github.com/tobyzerner/inclusive-elements/commit/e2e8483bc6f72b7c9793747a5fea940119c0f0d5))
97
+
98
+
99
+ ### Bug Fixes
100
+
101
+ * **popup:** don't hide popup if losing focus to nothing ([6a72581](https://github.com/tobyzerner/inclusive-elements/commit/6a7258133d5d83ea3d7d0c4e0700e8ef335ad680))
102
+ * **popup:** prevent `menuitem` click from bubbling up to any parent popups ([bebd0fb](https://github.com/tobyzerner/inclusive-elements/commit/bebd0fbf9b1af53662ffb529d15c962c1c1b529c))
103
+ * **tooltip:** prevent error if tooltip element no longer exists ([eb69dd2](https://github.com/tobyzerner/inclusive-elements/commit/eb69dd2bd637849880da2b242605694b2a182f59))
104
+
105
+ ## [0.5.0-beta.2](https://github.com/tobyzerner/inclusive-elements/compare/v0.5.0-beta.1...v0.5.0-beta.2) (2024-01-10)
106
+
107
+
108
+ ### ⚠ BREAKING CHANGES
109
+
110
+ * **alerts:** alerts can no longer be added by appending to the container
111
+
112
+ ### Features
113
+
114
+ * **tooltip:** add `open` and `close` events ([d2800e7](https://github.com/tobyzerner/inclusive-elements/commit/d2800e77f5e1c46c1e57ad3c05bf865881fcf4d8))
115
+ * **tooltip:** expose `show` and `hide` methods ([987d933](https://github.com/tobyzerner/inclusive-elements/commit/987d933aaa74076b5d401465f4cd42869a90698f))
116
+
117
+
118
+ ### Bug Fixes
119
+
120
+ * **alerts:** alerts can no longer be added by appending to the container ([4c2c433](https://github.com/tobyzerner/inclusive-elements/commit/4c2c433680eae6cf224d22c0f8f4176c48c56c99))
121
+ * **tooltip:** keep tooltip class updated ([cb19f93](https://github.com/tobyzerner/inclusive-elements/commit/cb19f93ef4094129c39cf13192688ecebd539b8b))
122
+
123
+ ## [0.5.0-beta.1](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.6...v0.5.0-beta.1) (2023-11-06)
124
+
125
+
126
+ ### Features
127
+
128
+ * **alerts:** remove hello-goodbye ([8e6583a](https://github.com/tobyzerner/inclusive-elements/commit/8e6583a04b211de7830d1e5d4a98afc1a9c34780))
129
+ * **modal:** lock body scrolling while modal is open ([59e693d](https://github.com/tobyzerner/inclusive-elements/commit/59e693dd1d44840fd0e1bc77b7224738efdd0e07))
130
+ * **popup:** use fixed positioning strategy instead of absolute ([d00137f](https://github.com/tobyzerner/inclusive-elements/commit/d00137f04bc60ba4f56bb817c7c0e022e38c71e7))
131
+ * **tooltip:** don't show tooltip on touch ([c8998bc](https://github.com/tobyzerner/inclusive-elements/commit/c8998bceae5ef066c8d80e20b324361b8513ff35))
132
+ * **tooltip:** only show tooltip on focus via Tab key ([bb9b0ce](https://github.com/tobyzerner/inclusive-elements/commit/bb9b0ced0aa25b1eac667c19cbfe7fc0f4f31879))
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * **modal:** activate focus trap after transition and fix autofocus ([66e0ca1](https://github.com/tobyzerner/inclusive-elements/commit/66e0ca19d1443e7eefa6acb500da415a0fb22943))
138
+ * **modal:** activate focus trap reliably at start of transition ([5036a4f](https://github.com/tobyzerner/inclusive-elements/commit/5036a4fd74d054e3c2dec3367e2bcd1f1d8f0b59))
139
+ * **modal:** fall back to default focus strategy if there is no autofocus element ([fe57357](https://github.com/tobyzerner/inclusive-elements/commit/fe5735724fcf4ab3bbf128ce793e2a37ec16067a))
140
+ * **popup:** subtract margins when calculating max popup size ([f842b6d](https://github.com/tobyzerner/inclusive-elements/commit/f842b6dd471c410f79e4a1bf08a904bd56fbbda8))
141
+
142
+ ### [0.4.6](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.5...v0.4.6) (2023-06-29)
143
+
144
+
145
+ ### Bug Fixes
146
+
147
+ * **tooltip:** prevent creating multiple positioners ([4dfc42d](https://github.com/tobyzerner/inclusive-elements/commit/4dfc42df3bfc14399107c9f187fd0b14ab1e4d0d))
148
+
149
+ ### [0.4.5](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.4...v0.4.5) (2023-06-29)
150
+
151
+
152
+ ### Bug Fixes
153
+
154
+ * **tooltip:** clean up tooltip positioner on disconnect ([a163ad7](https://github.com/tobyzerner/inclusive-elements/commit/a163ad768364400c48ea7fa024fde2c639cded75))
155
+
156
+ ### [0.4.4](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.3...v0.4.4) (2023-06-25)
157
+
158
+
159
+ ### Bug Fixes
160
+
161
+ * **alerts:** fix regression causing alerts not to show ([da0b283](https://github.com/tobyzerner/inclusive-elements/commit/da0b2838dc6e253fce11f7374d88a366e95f237b))
162
+
163
+ ### [0.4.3](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.2...v0.4.3) (2023-06-25)
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * **alerts:** fix previous alert with same key not being dismissed ([356e028](https://github.com/tobyzerner/inclusive-elements/commit/356e02867ac9f8c8755a4acf2d0b1d5355be1c6b))
169
+ * update hello-goodbye to fix transitions not running reliably ([89f23df](https://github.com/tobyzerner/inclusive-elements/commit/89f23df5a896e912a7ddc52b23842a3ba39be027))
170
+
171
+ ### [0.4.2](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.1...v0.4.2) (2023-06-11)
172
+
173
+
174
+ ### Features
175
+
176
+ * **tooltip:** auto-update position on scroll, resize, etc ([587de3b](https://github.com/tobyzerner/inclusive-elements/commit/587de3bfa5937b63ec9117b382e241ea48bb174a))
177
+
178
+
179
+ ### Bug Fixes
180
+
181
+ * **tooltip:** only update tooltip content if original element content has changed ([62ad220](https://github.com/tobyzerner/inclusive-elements/commit/62ad220cff2e0fed09fd47f04c4ab9ac4e90c21e))
182
+
183
+ ### [0.4.1](https://github.com/tobyzerner/inclusive-elements/compare/v0.4.0...v0.4.1) (2023-04-15)
184
+
185
+
186
+ ### Bug Fixes
187
+
188
+ * attempt to fix tree shaking ([ac1f1b1](https://github.com/tobyzerner/inclusive-elements/commit/ac1f1b17268f2fd592605ae575632d1d10da1d30))
189
+
190
+ ## [0.4.0](https://github.com/tobyzerner/inclusive-elements/compare/v0.3.4...v0.4.0) (2023-04-15)
191
+
192
+
193
+ ### ⚠ BREAKING CHANGES
194
+
195
+ * **disclosure:** `open` and `close` events have been removed - use `toggle` instead
196
+
197
+ ### Features
198
+
199
+ * **disclosure:** add `toggle` event for consistency with `<details>` ([9fc7f74](https://github.com/tobyzerner/inclusive-elements/commit/9fc7f74aebea1b3e48dd99a3000b91258f5ffcea))
200
+ * **tabs:** new `tabs` element ([4097e73](https://github.com/tobyzerner/inclusive-elements/commit/4097e7364e3787740d038967d99c25079f65b9ad))
201
+
202
+ ### [0.3.4](https://github.com/tobyzerner/inclusive-elements/compare/v0.3.3...v0.3.4) (2023-03-21)
203
+
204
+
205
+ ### Bug Fixes
206
+
207
+ * **disclosure:** fix issue with widget not closing in some cases ([cb3ae5d](https://github.com/tobyzerner/inclusive-elements/commit/cb3ae5d21be1fdadc284b510924b64e5e58e3137))
208
+
209
+ ### [0.3.3](https://github.com/tobyzerner/inclusive-elements/compare/v0.3.2...v0.3.3) (2023-03-17)
210
+
211
+
212
+ ### Bug Fixes
213
+
214
+ * **popup:** fix layout flicker when opening popup ([42a397b](https://github.com/tobyzerner/inclusive-elements/commit/42a397bd80dce342d34b56d22c26f659c7f7f8f0))
215
+
216
+ ### [0.3.2](https://github.com/tobyzerner/inclusive-elements/compare/v0.3.1...v0.3.2) (2023-03-17)
217
+
218
+
219
+ ### Bug Fixes
220
+
221
+ * **tooltip:** prevent tooltip flicker on touch scroll ([2e461de](https://github.com/tobyzerner/inclusive-elements/commit/2e461de11124f57d5d64f49626d8a36ad1fb7ec4))
222
+
223
+ ### [0.3.1](https://github.com/tobyzerner/inclusive-elements/compare/v0.3.0...v0.3.1) (2023-03-17)
224
+
225
+
226
+ ### Bug Fixes
227
+
228
+ * **tooltip:** show tooltip on touch ([d421649](https://github.com/tobyzerner/inclusive-elements/commit/d4216490099133c038d4557fcff5297f7072a937))
229
+
230
+ ## [0.3.0](https://github.com/tobyzerner/inclusive-elements/compare/v0.2.2...v0.3.0) (2023-03-16)
231
+
232
+
233
+ ### Features
234
+
235
+ * add Disclosure and Accordion elements ([0df80d3](https://github.com/tobyzerner/inclusive-elements/commit/0df80d30e776ea9ecd149da61c96932a39786386))
236
+
237
+
238
+ ### Bug Fixes
239
+
240
+ * **modal:** prevent scroll on focus trap (de)activation ([4e09d5f](https://github.com/tobyzerner/inclusive-elements/commit/4e09d5f331fb2a0b6b07b5dcfae9d87a4945b128))
241
+ * **popup:** allow popup trigger button to be nested ([6c62efd](https://github.com/tobyzerner/inclusive-elements/commit/6c62efd39b6f8e628d78711202cf0915f1f733ef))
242
+
243
+ ## [0.2.2] - 2023-03-05
244
+ ### Added
245
+ - Alerts: Handle pre-existing children and any subsequently added to the container. Options can be specified as `[data-*]` attributes.
246
+ - Popup: Allow popups to be disabled using the `[disabled]` attribute.
247
+ - Popup: Don't open popup if modifier keys are pressed. This allows link popup triggers to be opened in a new tab.
248
+
249
+ ### Fixed
250
+ - Popup: Clean up event listeners when popup element is disconnected.
251
+
252
+ ## [0.2.1] - 2022-08-05
253
+ ### Fixed
254
+ - Fix package not including dist files.
255
+
256
+ ## [0.2.0] - 2022-08-05
257
+ ### Changed
258
+ - Upgrade to `@floating-ui/dom` 1.0.0.
259
+ - Switch build tool from Rollup to Vite.
260
+
261
+ ## [0.1.3] - 2022-06-05
262
+ ### Added
263
+ - Popup: Update popup position on resize.
264
+
265
+ ### Fixed
266
+ - Alerts: Dismiss all alerts by key, not just the first one.
267
+ - Modal: Fix some focus issues.
268
+ - Popup: Fix max size not being applied.
269
+ - Tooltip: Clear timeout on disconnect.
270
+
271
+ ## [0.1.2] - 2022-03-03
272
+ ### Fixed
273
+ - Popup: Fix calculated max size overriding CSS max-size declaration, even if it's larger.
274
+
275
+ ## [0.1.1] - 2022-02-22
276
+ ### Fixed
277
+ - Popup: Fix popup content not having a max size applied.
278
+
279
+ ## [0.1.0] - 2022-01-28
280
+ ### Fixed
281
+ - Menu: Ensure that Arrow keys only navigate to items that are focusable.
282
+ - Modal: Fix focus not being placed correctly when modal is open on creation.
283
+
284
+ ## [0.1.0-beta.9] - 2022-01-27
285
+ ### Added
286
+ - New element: Toolbar.
287
+ - Support for tree-shaking so unused elements won't be included in the bundle.
288
+ - Use `prefers-reduced-motion` media queries for transition CSS examples.
289
+ - Alerts: New `clear` method to dismiss all alerts.
290
+ - Popup: Additional discussion and demonstration of use-cases.
291
+ - Tooltip: Support for hovering over tooltip contents (opt-out with `pointer-events: none`).
292
+
293
+ ### Changed
294
+ - External dependencies are no longer included in the bundle, meaning a bundler is required for use.
295
+ - Modal: Use [focus-trap](https://github.com/focus-trap/focus-trap) instead of `inert` so that modals do not have to be placed as a direct child of the `<body>`.
296
+ - Popup, Tooltip: Use [Floating UI](https://floating-ui.com) instead of Placement.js for element positioning.
297
+
298
+ ### Fixed
299
+ - Set various ARIA attributes less aggressively (ie. only if they haven't already been set).
300
+ - Alerts: Export the `AlertOptions` type definition.
301
+ - Menu: Attach event listeners to menu element rather than document.
302
+ - Popup: Only add `aria-haspopup="true"` if the content has the `menu` role.
303
+ - Popup: Close the popup if the user tabs away from it.
304
+ - Tooltip: Hide the tooltip when the page is scrolled.
305
+
306
+ ## [0.1.0-beta.8] - 2021-09-12
307
+ ### Added
308
+ - Tooltip: Hide tooltip when Escape key is pressed. (3bcdfcc8)
309
+
310
+ ### Removed
311
+ - Tooltip: Remove support for touch devices. (7e1c0e69)
312
+
313
+ ### Fixed
314
+ - Tooltip: Fix parent event listeners not being removed properly on disconnect. (a75b6997)
315
+
316
+ ## [0.1.0-beta.7] - 2021-05-27
317
+ ### Fixed
318
+ - Tooltip: Only remove event listeners on disconnection if parent still exists.
319
+
320
+ ## [0.1.0-beta.6] - 2021-05-20
321
+ ### Changed
322
+ - Alerts: Increase default alert duration to 10 seconds.
323
+
324
+ ### Fixed
325
+ - Tooltip: Fix behavior on touch devices.
326
+ - Update Placement.js to fix incorrect positions when horizontally scrolled.
327
+
328
+ ## [0.1.0-beta.5] - 2021-05-18
329
+ ### Changed
330
+ - Update `hello-goodbye` version.
331
+
332
+ ## [0.1.0-beta.4] - 2021-05-09
333
+ ### Changed
334
+ - Popup: Don't close when a `menuitemcheckbox` is clicked.
335
+ - Popup: Only return focus to button when Escape key is used to close popup.
336
+
337
+ ### Fixed
338
+ - Tooltip: Hide tooltip on click, or if parent becomes disabled.
339
+ - Implemented disconnect callbacks to properly clean up element side effects.
340
+
341
+ ### Removed
342
+ - Popup: Don't set z-index - leave this to the userspace.
343
+
344
+ ## [0.1.0-beta.3] - 2021-03-05
345
+ ### Fixed
346
+ - Recompile dist file.
347
+
348
+ ## [0.1.0-beta.2] - 2021-03-05
349
+ ### Fixed
350
+ - Update `hello-goodbye` version.
351
+ - Mark package as side-effect free.
352
+
353
+ [0.2.2]: https://github.com/tobyzerner/inclusive-elements/compare/v0.2.1...v0.2.2
354
+ [0.2.1]: https://github.com/tobyzerner/inclusive-elements/compare/v0.2.0...v0.2.1
355
+ [0.2.0]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.3...v0.2.0
356
+ [0.1.3]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.2...v0.1.3
357
+ [0.1.2]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.1...v0.1.2
358
+ [0.1.1]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0...v0.1.1
359
+ [0.1.0]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.9...v0.1.0
360
+ [0.1.0-beta.9]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.8...v0.1.0-beta.9
361
+ [0.1.0-beta.8]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.7...v0.1.0-beta.8
362
+ [0.1.0-beta.7]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.6...v0.1.0-beta.7
363
+ [0.1.0-beta.6]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.5...v0.1.0-beta.6
364
+ [0.1.0-beta.5]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.4...v0.1.0-beta.5
365
+ [0.1.0-beta.4]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.3...v0.1.0-beta.4
366
+ [0.1.0-beta.3]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.2...v0.1.0-beta.3
367
+ [0.1.0-beta.2]: https://github.com/tobyzerner/inclusive-elements/compare/v0.1.0-beta.1...v0.1.0-beta.2
package/README.md CHANGED
@@ -1,37 +1,41 @@
1
1
  # Inclusive Elements
2
2
 
3
- **Accessible, lightweight, unstyled implementations of common UI controls.**
3
+ **Accessible, lightweight, unstyled patterns for inclusive UI.**
4
4
 
5
5
  [**Demo**](https://tobyzerner.github.io/inclusive-elements/index.html)
6
6
 
7
- Basic interactive UI patterns like popup menus, tooltips, and modals are surprisingly hard to get right on the web. Component libraries tend to be weighty, opinionated, and come tightly coupled with styles you don't want. On the other hand, rolling your own components feels like you're reinventing the wheel and puts accessibility at risk.
7
+ `inclusive-elements` is a set of documented patterns and lightweight supporting elements for implementing common interface patterns.
8
8
 
9
- `inclusive-elements` provides those basic behaviors in the form of Custom Elements, without any of the cruft. They are:
9
+ - **🦮 Accessible.** Built around native semantics and established inclusive interaction patterns.
10
+ - **🌳 Lightweight.** Prefer the platform first, and only add JS where it meaningfully helps.
11
+ - **🎨 Unstyled.** Bring your own design without fighting defaults.
12
+ - **🚀 Easy to use.** Straightforward markup, small APIs, and designed for modern browsers with the platform features each pattern depends on.
10
13
 
11
- - **🦮 Accessible.** Designed following the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/) so everyone can use them.
12
- - **🌳 Lightweight.** Tree-shake only the elements you need.
13
- - **🎨 Unstyled.** Easily integrate with your design bottom-up without having to fight defaults.
14
- - **🚀 Easy to use.** Simple API, works with any framework that supports Custom Elements.
14
+ Each pattern in this library starts from the same question: what is the simplest, most inclusive way to build this on the platform today? Sometimes the answer is fully native HTML. Sometimes it is native HTML plus a small supporting custom element. The docs and demo are organized around patterns so you can start with the UI you need and immediately see the recommended implementation path.
15
+
16
+ Runtime elements are only shipped for the patterns that still need behavior the platform does not provide directly:
17
+ `ui-alerts`, `ui-menu`, `ui-tabs`, `ui-toolbar`, and `ui-tooltip`.
18
+ The other pattern docs are native-first guidance, including the accessibility work authors still need to do in their own markup.
15
19
 
16
20
  ## Installation
17
21
 
18
- ```
19
- npm install inclusive-elements --save
22
+ ```sh
23
+ npm install inclusive-elements
20
24
  ```
21
25
 
22
- ## Elements
26
+ Patterns in this package rely on modern browser features such as the Popover API, hint popovers, CSS anchor positioning, `<details name>`, and `<dialog>`.
23
27
 
24
- Detailed descriptions and usage instructions are contained within each element:
28
+ ## Patterns
25
29
 
26
- - [Accordion](src/accordion)
27
- - [Alerts](src/alerts)
28
- - [Disclosure](src/disclosure)
29
- - [Menu](src/menu)
30
- - [Modal](src/modal)
31
- - [Popup](src/popup)
32
- - [Tabs](src/tabs)
33
- - [Toolbar](src/toolbar)
34
- - [Tooltip](src/tooltip)
30
+ - [Accordion](src/accordion/README.md): native `<details name>` for grouped disclosure sections.
31
+ - [Alerts](src/alerts/README.md): `<ui-alerts>` for polite or assertive announcements, timed dismissal, and animated stacking.
32
+ - [Disclosure](src/disclosure/README.md): native `<details>` and `<summary>`.
33
+ - [Menu](src/menu/README.md): native `popover` for the surface, plus `<ui-menu>` for keyboard navigation, typeahead, and submenu coordination.
34
+ - [Dialog](src/dialog/README.md): native `<dialog>` for modality and focus handling.
35
+ - [Popover](src/popover/README.md): native `popover` plus CSS anchor positioning.
36
+ - [Tabs](src/tabs/README.md): `<ui-tabs>` for button-based tab selection and panel visibility.
37
+ - [Toolbar](src/toolbar/README.md): `<ui-toolbar>` for arrow-key focus management.
38
+ - [Tooltip](src/tooltip/README.md): native hint popovers, plus `<ui-tooltip>` for owner resolution and interaction behavior.
35
39
 
36
40
  ## Contributing
37
41