DEV Community

Discussion on: Why can't we solve accessibility with a one line script tag?

Collapse
 
link2twenty profile image
Andrew Bone

Very nice article and so true. For the modal component there is dialog but support isn't great, basically just in blink browsers.

I like using inert which is supported in literally 0 browsers so I have to polyfill it. I do hope it gets supported though. It just makes so much sense.


On a side note when you do code snippets if you include the language you're using you will get syntax highlighting, like this.

```html
Enter fullscreen mode Exit fullscreen mode

Example of actual code.

<div>
  <span>Hello!
</div>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
oenonono profile image
Junk • Edited

What's the polyfill?

[inert] { pointer-events: none }
Enter fullscreen mode Exit fullscreen mode

Plus disabled and/or tabindex="-1"?

Collapse
 
link2twenty profile image
Andrew Bone

I use a JS one from WICG
github.com/WICG/inert