Socket
Socket
Sign inDemoInstall

@reach/alert

Package Overview
Dependencies
Maintainers
4
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/alert - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

7

dist/alert.cjs.development.js

@@ -130,2 +130,9 @@ 'use strict';

reactDom.render(React__default.createElement(VisuallyHidden, null, React__default.createElement("div", {
// The status role is a type of live region and a container whose
// content is advisory information for the user that is not
// important enough to justify an alert, and is often presented as
// a status bar. When the role is added to an element, the browser
// will send out an accessible status event to assistive
// technology products which can then notify the user about it.
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_status_role
role: type === "assertive" ? "alert" : "status",

@@ -132,0 +139,0 @@ "aria-live": type

@@ -123,2 +123,9 @@ import React, { forwardRef, useRef, useMemo, useEffect } from 'react';

render(React.createElement(VisuallyHidden, null, React.createElement("div", {
// The status role is a type of live region and a container whose
// content is advisory information for the user that is not
// important enough to justify an alert, and is often presented as
// a status bar. When the role is added to an element, the browser
// will send out an accessible status event to assistive
// technology products which can then notify the user about it.
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_status_role
role: type === "assertive" ? "alert" : "status",

@@ -125,0 +132,0 @@ "aria-live": type

12

dist/index.d.ts
/**
* Welcome to @reach/alert!
*
* An alert is an element that displays a brief, important message in a way that
* attracts the user's attention without interrupting the user's task.
* Dynamically rendered alerts are automatically announced by most screen
* readers, and in some operating systems, they may trigger an alert sound.
*
* The approach here is to allow developers to render a visual <Alert> and then
* we mirror that to a couple of aria live regions behind the scenes. This way,
* we mirror that to a couple of aria-live regions behind the scenes. This way,
* most of the time, developers don't have to think about visual vs. aria

@@ -14,8 +19,7 @@ * alerts.

* with default context to do it, but we haven't explored that yet. So, we'll
* see how this goes, and if it becomes a problem, we can introduce a portal
* later.
* see how this goes. If it becomes a problem we can introduce a portal later.
*
* @see Docs https://reacttraining.com/reach-ui/alert
* @see Source https://github.com/reach/reach-ui/tree/master/packages/alert
* @see WAI-ARIA https://www.w3.org/TR/wai-aria-practices-1.1/#alert
* @see WAI-ARIA https://www.w3.org/TR/wai-aria-practices-1.2/#alert
*/

@@ -22,0 +26,0 @@ import React from "react";

{
"name": "@reach/alert",
"version": "0.9.0",
"version": "0.9.1",
"description": "Screen-reader-friendly alert messages.",

@@ -32,3 +32,3 @@ "author": "React Training <hello@reacttraining.com>",

],
"gitHead": "0c789bb48554bf13c62dd09210ebdf2f9af33d30"
"gitHead": "19b5b1ec7682dfed613512f1592958a47d43ad4d"
}

@@ -5,3 +5,3 @@ # @reach/alert

[Docs](https://reacttraining.com/reach-ui/alert) | [Source](https://github.com/reach/reach-ui/tree/master/packages/alert) | [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices-1.1/#alert)
[Docs](https://reacttraining.com/reach-ui/alert) | [Source](https://github.com/reach/reach-ui/tree/master/packages/alert) | [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/#alert)

@@ -8,0 +8,0 @@ Screen-reader-friendly alert messages. In many apps developers add "alert" messages when network events or other things happen. Users with assistive technologies may not know about the message unless you develop for it.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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