Dialog Markup5:32 with Nick Pettit
Traditional dialog windows created with other HTML markup and CSS have been implemented in most frontend frameworks for a long time, and that's probably still the way to go, since the HTML dialog element still has limited browser support. However, there are many reasons to consider using the
<dialog> element moving forward, such as accessibility by screen readers and the ability for things like search engines and machine learning agents to interpret dialog windows.
HTML Dialog - caniuse.com - Check out this chart from caniuse.com to see current browser support for the
HTML Dialog - MDN - Here's the MDN documentation page with the full details on the
HTML Dialog Polyfill - If you want to use the
<dialog>element now, check out this polyfill from the Google Chrome team that makes it work in all modern browsers.
You need to sign up for Treehouse in order to download course files.Sign up