Socket
Socket
Sign inDemoInstall

react-aria-modal

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-aria-modal - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

4

CHANGELOG.md
# Changelog
## 2.2.0
- Add `applicationNode` prop.
## 2.1.0

@@ -4,0 +8,0 @@

@@ -26,2 +26,3 @@ var React = require('react');

initialFocus='#demo-one-deactivate'
applicationNode={document.getElementById('application')}
>

@@ -28,0 +29,0 @@ <div id='demo-one-modal' className='modal'>

@@ -25,2 +25,5 @@ var React = require('react');

verticallyCenter: PropTypes.bool,
applicationNode: PropTypes.shape({
setAttribute: PropTypes.func.isRequired,
}),
},

@@ -47,2 +50,8 @@

}
// Timeout to ensure this happens *after* focus has moved
setTimeout(function() {
if (this.props.applicationNode) {
this.props.applicationNode.setAttribute('aria-hidden', 'true');
}
}, 0);
},

@@ -52,2 +61,5 @@

noScroll.off();
if (this.props.applicationNode) {
this.props.applicationNode.setAttribute('aria-hidden', 'false');
}
},

@@ -54,0 +66,0 @@

2

package.json
{
"name": "react-aria-modal",
"version": "2.1.0",
"version": "2.2.0",
"description": "A fully accessible and flexible React modal built according WAI-ARIA Authoring Practices",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -133,2 +133,10 @@ # react-aria-modal

### applicationNode
Type: `DOM Node`
Provide your main application node here (which the modal should render outside of), and when the modal is open this application node will receive the attribute `aria-hidden="true"`. This [can help screen readers understand what's going on](https://www.w3.org/WAI/GL/wiki/Using_ARIA_role%3Ddialog_to_implement_a_modal_dialog_box#Description).
This module can't guess your application node, so you have to provide this prop to get the full accessibility benefit.
### alert

@@ -135,0 +143,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc