Plans to support the 'dialog' html element?

Any plans to support the ‘dialog’ html element?
dialog element desc

1 Like

In Bootstrap it is called modal

1 Like

Yes, the modal element is supported in BSS, but not the ‘dialog’ element (at least I haven’t found it). When implementing a spinner, I found that the dialog element saved me a fair amount of coding both html/bootstrap5 and javascript, compared to the modal element.
FMI on dialog element, select the link in my earlier post. Anyway, BSS has a permanent place in my toolkit. Consequently, I’d prefer not to write custom code in BSS to inject the dialog element.

Here is the advanced example from your link. It is three lines of javascript and no CSS

1 Like

Thanks for your replay. However, I’m not looking for ‘how-to-code’. I’m past that. I’m merely asking the BSS developers if there are plans to support the <dialog> element in BSS.

But for what? No one uses it in 2k21. Theres literally no reason to support it cause no one uses it. It was used years ago. Why are u trying to make webs oldschool like? Devs have better things to do than adding dialogs etc honestly also the support for webrowsers is pretty bad and thats a reason why there are modals. I literally see no rational reason to use the dialog tag, ure literally making ur work harder.

1 Like

But for what?
Well for me, it means reduced maintenance effort, increased productivity, reduced development time. Perhaps you can point me to evidence/links that “No one uses it…” or “no rational reason to use the dialog tag”.

I may be mistaken but it looks to me like the <dialog> element is relatively new.

Check this out fairly recent post, updated on January 25, 2020:

Dialog boxes and lightboxes are extensively used in websites and apps. Until this time they needed to be custom made — use a series of <div>s to create the container, set CSS of dialog so that it is centered, and use Javascript event handlers to show / hide the modal box.

Now browsers have introduced the new <dialog> tag that makes it easier to create dialogs and lightboxes. With Javascript you can call methods to open the dialog or close it, or know when the dialog was closed through an event.

With the tag, expect 50% of your workload to be reduced while creating a modal box.

BTW: Recently, I implemented a modal, with a divs and a bunch of js. It was a tedious. I then stumbled upon <dialog>, and I redid the div/modal stuff with <dialog> and yep, it took about half the time and less than half the markup of modal.

Here’s another one from Simple Guide to HTML Dialog Element, dated Aug2019:
The <dialog> element was added to HTML in order to identify a part of a web page or application that a user interacts with such as a dialog box, window, or inspector.

This is a newer element, so it is not supported in all browsers.

Not saying it should be added to BSS or not but yous might be interested in hearing Wes Bos’s and Scott Tolinski’s discussion about a Modal/Dialog HTML element.
Go to 40.59

Spotty support for <dialog> may explain it…<dialog>

Not supported in latest versions of Firefox, Safari or iOS Safari. That’s a significant segment of the browser market.

Sorry I kinda said it incorrectly by that what I meant in my previous comment was the way of making websites/web apps and “it was used years ago” i specifically meant the oldschool way of making websites, its 2k21 and custom components cause it provides good webrowsers support by making a component from scratch than using a dialog tag that was what i meant in my previous comment i just said it chaotically and incorrectly which could confuse you although it doesn’t really change anything what ive said. Dialog also doesnt make any improvement to seo, so no reason to use it as ive said i doubt that devs would add it atm. They do add tags which are safe to use and provides guarantee support atleast decent support and dialog support is just bad that’s why modal is better and I dont get it what ure doing in ur js code there but it shouldn’t take a lot of time to code the functionality or anything else. Im using vue with bsstudio so idc about vanilla js too often.