Skip to content

Add native dialog element support #13807

Open
4 of 8 issues completed
Open
Enhancement
4 of 8 issues completed
@tay1orjones

Description

@tay1orjones

Context

An initial exploration and delivery of a Dialog component was done a while ago:

This experimental work was never exported or shown in storybook but still lives in the codebase. Most of the spec of that work stream was focused on managing focus and handling interactions such as escape closing the dialog.

The current state

Since then, there has been some progress on the native dialog element spec and much of this focus and interaction behavior is now provided natively by browsers.

Proposal

This issue is to propose considering using the native dialog element in place of the existing implementation that uses the FocusScope primitive.

Depending on what we consider to be "must have" functionality of a Dialog, it might be that the bulk of the requirements might be met by the dialog element. It might be a simple wrapper around that element is all we need.

Pieces solved in #15926

  • Evaluate the interaction provided via the native element
  • Compare the native implementation to the one we have in the codebase today
  • Determine what we may need to provide to consumers in addition to what is provided by default by the browser implementation
  • Potentially refactor the implementation to not manage focus via the FocusScope helpers (potentially remove these helpers if they're not being used)

Outstanding items that still need to be made into sub-issues

  • Add Dialog and associated refactors/usages/etc. to @carbon/web-components
  • Move to stable , work through stable checklist (code, website docs, etc.)
  • ...

Sub-issues

Metadata

Metadata

Labels

Projects

Status

Now 💫

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions