Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .changeset/content-role-dialog-element.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/react/dialog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @dunky.dev/react-dialog

## 0.3.0

### Minor Changes

- [#40](https://github.com/dunky-dev/ui/pull/40) [`148ee66`](https://github.com/dunky-dev/ui/commit/148ee66481f70852734a77814643814af5b339fc) Thanks [@ivanbanov](https://github.com/ivanbanov)! - `Dialog.Content` now renders a `<div>` carrying the `dialog` (or `alertdialog`) role instead of the native `<dialog>` element. Consumers styling `dialog { ... }` should target the part directly (or its role), and a forwarded ref is now an `HTMLDivElement`; `...props` accept `ComponentProps<'div'>`.

The dialog window is the initial focus target — focusable in script, out of the tab order — which needs `tabindex="-1"`, and HTML states that [the `tabindex` attribute must not be specified on `dialog` elements](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element). The native element would only pay off through `showModal()`, and this contract deliberately keeps modality, dismissal, and focus in the core machine rather than splitting authority with the browser's built-in behavior — so the element brought nothing but a conformance violation. Nothing about the exposed semantics changes: the same role, `aria-modal`, name, description, and focus behavior as before. UA `<dialog>` resets (`position: static`, `border: none`) are no longer needed in consumer styles.

## 0.2.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dunky.dev/react-dialog",
"version": "0.2.2",
"version": "0.3.0",
"description": "React binding for @dunky.dev/dialog.",
"license": "MIT",
"repository": {
Expand Down