a11y-dialog VS dialog-polyfill

Compare a11y-dialog vs dialog-polyfill and see what are their differences.

a11y-dialog

A very lightweight and flexible accessible modal dialog script. (by HugoGiraudel)

dialog-polyfill

Polyfill for the HTML dialog element (by GoogleChrome)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
a11y-dialog dialog-polyfill
3 8
2,374 2,430
- 0.1%
8.6 0.0
8 days ago 2 months ago
JavaScript JavaScript
MIT License BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

a11y-dialog

Posts with mentions or reviews of a11y-dialog. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-14.
  • How would you improve this warning modal and add some red or yellow color to it?
    1 project | /r/css | 11 Sep 2022
    If it's a warning it should probably be role="alertdialog" rather than role="dialog". This will allow assistive devices to prioritize its content and trigger things like an alert sound. You probably also want to put keyboard focus on the least destructive action, which in your case would be the "save changes" button, rather than leaving keyboard focus above the close button. Here's a script by Kitty Giraudel that will do most of this for you, if you want.
  • New WebKit Features in Safari 15.4
    7 projects | news.ycombinator.com | 14 Mar 2022
    On that note, TIL about screen reader issues related to dialogs in general, including this built-in. Seems like the question is primarily around how to update the focus target from the "invoking element" to the dialog's content in a reader-friendly way. There's a linked post from the MDN docs with more detail https://www.scottohara.me/blog/2019/03/05/open-dialog.html#i.... They actually still recommend a custom implementation that's considered more robust when used with screen readers: https://github.com/KittyGiraudel/a11y-dialog. I'm glad there's a callout on the MDN docs as I would have assumed this dialog element is screen reader clean. Focus management is always a tough thing regardless.
  • HugoGiraudel/a11y-dialog: A lightweight and flexible accessible modal dialog
    1 project | news.ycombinator.com | 23 Feb 2021

dialog-polyfill

Posts with mentions or reviews of dialog-polyfill. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-11.
  • The <Dialog> Element
    4 projects | news.ycombinator.com | 11 Feb 2023
    > - Z-index has no effect in the top-layer. No need to compete for a higher z-index.

    This is the kind of boring feature that can end up saving huge amounts of developer time. Z-indexing in CSS is kind of annoying and I've seen projects just detach dialogs from their normal position in the DOM entirely to get around stacking errors before.

    ----

    Minor question:

    > - There is only one `top-layer` but it can have many children. Last opened === current element on top.

    Is this true? The spec says:

    > The top layer is an ordered set of elements, rendered in the order they appear in the set. The last element in the set is rendered last, and thus appears on top.

    I'm still playing around with `dialog` elements, so you may well be right, I'm just having trouble finding the actual spec rules about what happens when there are multiple dialogs and they're being simultaneously manipulated.

    ----

    > - Not supported in Safari <= 15.3

    Worth noting that there is a polyfill (https://github.com/GoogleChrome/dialog-polyfill), but that the polyfill comes with some fairly large limitations, specifically that they don't advise dialogs be used as children of elements with their own stacking context.

    This is reasonable, but also... my first thought when I originally ran into `dialog` was "finally I can stop worrying about which of my elements create new stacking contexts!" -- so it does decrease the usefulness quite a bit.

  • La espera terminó: el elemento <dialog> alcanza pleno soporte
    1 project | dev.to | 19 Apr 2022
  • Is learning Vue instead of React a mistake?
    2 projects | /r/learnjavascript | 12 Apr 2022
    Yeah, Safari is pretty often behind the other popular browsers. But, you can generally predict that by looking for any given feature on MDN and check the "Browser compatibility" section. Sometimes, there are polyfills available that sort of "force" a feature to work across every browser.
  • Can we use &lt;dialog&gt; yet?
    1 project | /r/webdev | 20 Mar 2022
    (Searching for "polyfill " will usually get you good results - in this case the first result appears to be a library maintained by the Chrome team: https://github.com/GoogleChrome/dialog-polyfill )
  • New WebKit Features in Safari 15.4
    7 projects | news.ycombinator.com | 14 Mar 2022
    This does not make sense. Of course new functionality won't work on old browsers.

    is easy to polyfill well: https://github.com/GoogleChrome/dialog-polyfill
  • Just a single tag can create this dialog box. &lt;dialog&gt; tag with open attribute created this simple styled centered box. =&gt; &lt;dialog open&gt;This is a dialog box&lt;/dialog&gt;
    1 project | /r/webdev | 13 Jan 2022
    GoogleChrome / dialog-polyfill
  • Using for Menus and Dialogs Is an Interesting Idea
    4 projects | news.ycombinator.com | 24 Apr 2021

What are some alternatives?

When comparing a11y-dialog and dialog-polyfill you can also consider the following projects:

pa11y - Pa11y is your automated accessibility testing pal

sciter - Sciter: the Embeddable HTML/CSS/JS engine for modern UI development

svelte-navigator - Simple, accessible routing for Svelte

kill-sticky - Bookmarklet to remove sticky elements and restore scrolling to web pages!

caniuse - Raw browser/feature support data from caniuse.com

autoprefixer - Parse CSS and add vendor prefixes to rules by Can I Use

axe-core - Accessibility engine for automated Web UI testing

webmidi-test - 🎵 Web MIDI Test page with basic device hotplug support

standards-positions

devadvance

WHATWG HTML Standard - HTML Standard