Skip to content

aria-hidden="true" for portal element causes Chrome errors in consoleΒ #7

@yapus

Description

@yapus

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch solid-dismiss@1.8.2 for the project I'm working on.

When using Modal Overflowing Viewport Height example code I noticed Chrome was complaining with errors, that aria-hidden should not be set in this case and should be replaced with special "inert" attribute.

Here is the diff that solved it for me:

diff --git a/node_modules/solid-dismiss/dist/esm/index.js b/node_modules/solid-dismiss/dist/esm/index.js
index 783b150..a820280 100644
--- a/node_modules/solid-dismiss/dist/esm/index.js
+++ b/node_modules/solid-dismiss/dist/esm/index.js
@@ -2116,7 +2116,7 @@ function CustomPortal(props) {
 }
 
 var _tmpl$ = /*#__PURE__*/template(`<div role=presentation>`),
-    _tmpl$2 = /*#__PURE__*/template(`<div><div style=position:fixed;top:0;left:0;outline:none;pointer-events:none;width:0;height:0; aria-hidden=true></div><div style=position:fixed;top:0;left:0;outline:none;pointer-events:none;width:0;height:0; aria-hidden=true>`);
+    _tmpl$2 = /*#__PURE__*/template(`<div><div style=position:fixed;top:0;left:0;outline:none;pointer-events:none;width:0;height:0; inert=true></div><div style=position:fixed;top:0;left:0;outline:none;pointer-events:none;width:0;height:0; inert=true>`);
 /**
  * ### Notes
  *

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions