nrkno / core-components

Accessible and lightweight Javascript components
https://static.nrk.no/core-components/latest/
MIT License
117 stars 10 forks source link

core-dialog: can we use native <dialog> yet? #698

Closed htor closed 1 year ago

htor commented 1 year ago

hi! I'm maintaining another component library similar to this which also has a custom made dialog component using WAI-ARIA and was wondering perhaps it's time to switch to using the native <dialog> element to do the hard work for our dialog components?

...or maybe not? what are your thoughts?

(if i remember correctly there was "issues" with <dialog> regarding A11Y but i can't remember what it was. the browser landscape surely has changed over the years regarding support, but maybe not so much screenreaders? is it safe to use it?

cheers!

skjalgepalg commented 1 year ago

We've gone a bit back and forth on the subject; from our testing the a11y support for native <dialog> element seems to be good enough, also for screen readers, to start using native instead of <core-dialog>.

That said we do still have a significant amount of visits from Safari < v15.4 and IE, which do not have support for the native element. Because of this we are still using <core-dialog> until we can be sure that native works for all our users.

htor commented 1 year ago

thanks for your insight!