Socket
Socket
Sign inDemoInstall

@reach/visually-hidden

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/visually-hidden - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

3

es/index.js

@@ -5,2 +5,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var style = {
display: "block",
border: 0,

@@ -17,3 +18,3 @@ clip: "rect(0 0 0 0)",

function VisuallyHidden(props) {
return React.createElement("div", _extends({
return React.createElement("span", _extends({
style: style

@@ -20,0 +21,0 @@ }, props));

@@ -1,7 +0,21 @@

declare module "@reach/visually-hidden" {
import * as React from "react";
const VisuallyHidden: React.FunctionComponent<
React.HTMLProps<HTMLDivElement>
>;
export default VisuallyHidden;
}
/**
* Provides text for screen readers that is visually hidden.
* It is the logical opposite of the `aria-hidden` attribute.
*
* @see https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
* @see https://a11yproject.com/posts/how-to-hide-content/
* @see Docs https://reacttraining.com/reach-ui/visually-hidden
* @see Source https://github.com/reach/reach-ui/tree/master/packages/visually-hidden
*/
import * as React from "react";
/**
* Provides text for screen readers that is visually hidden.
* It is the logical opposite of the `aria-hidden` attribute.
*/
declare const VisuallyHidden: React.FunctionComponent<
React.HTMLProps<HTMLSpanElement>
>;
export default VisuallyHidden;

@@ -13,2 +13,3 @@ "use strict";

var style = {
display: "block",
border: 0,

@@ -25,3 +26,3 @@ clip: "rect(0 0 0 0)",

function VisuallyHidden(props) {
return _react["default"].createElement("div", _extends({
return _react["default"].createElement("span", _extends({
style: style

@@ -28,0 +29,0 @@ }, props));

{
"name": "@reach/visually-hidden",
"version": "0.4.0",
"version": "0.5.0",
"description": "Render text that is announced to screen readers but visually hidden.",

@@ -23,3 +23,3 @@ "main": "index.js",

],
"gitHead": "0f3d2c7e530cd80e1d1bd338182ac89a3ba23999"
"gitHead": "7e33672d882cd6df77ac8cdb76b6b4a21dbf28c2"
}
import React from "react";
let style = {
display: "block",
border: 0,

@@ -15,5 +16,5 @@ clip: "rect(0 0 0 0)",

function VisuallyHidden(props) {
return <div style={style} {...props} />;
return <span style={style} {...props} />;
}
export default VisuallyHidden;
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