diff --git a/FUTURE_IMPROVEMENTS.md b/FUTURE_IMPROVEMENTS.md new file mode 100644 index 00000000..e3013c55 --- /dev/null +++ b/FUTURE_IMPROVEMENTS.md @@ -0,0 +1,83 @@ +# Future Improvements + +A running list of component improvements surfaced while writing documentation. These are **not** doc issues — the docs describe the components as they behave today. Each item is a candidate enhancement to the `ui` package (or its demos), grouped by theme and roughly ordered by impact. + +> Context: compiled from a documentation pass across the component library. Paths point at the relevant source so each can be picked up independently. + +## Accessibility + +Most components are built on Radix and inherit good accessibility. The items below are where the design system's own additions (or omissions) create gaps. + +- **Spinner** — renders bare `
`s with no `role="status"` or `aria-label`, so loading is conveyed only visually and is invisible to screen readers. Add `role="status"` + an accessible label (e.g. "Loading"). + `packages/ui/src/components/spinner/spinner.tsx` +- **Loading Overlay** — no `role="status"`/`aria-live`, no focus trap, and no `aria-busy` on the blocked content. Screen reader users may not be told loading started, and keyboard focus can still reach content behind the overlay. Add a live region and focus management. + `packages/ui/src/components/loading-overlay/loading-overlay.tsx` +- **Command** — keyboard navigation works, but there is no visual highlight for the active item. cmdk marks it with `data-selected="true"`, but `.command-item` only styles `:hover`/`:focus`. Add a `data-[selected=true]` rule mirroring the hover colors: + ```css + @apply data-[selected=true]:text-lilac-700! data-[selected=true]:bg-lilac-300/50!; + @apply dark:data-[selected=true]:bg-lilac-600/50! dark:data-[selected=true]:text-lilac-100!; + ``` + `packages/ui/src/components/command/command.module.css` +- **Pagination** — numbered page buttons convey the current page only via color (`primary` vs `tertiary`), with no `aria-current="page"`; the control group isn't wrapped in a `