@wordpress/a11y
Advanced tools
Comparing version 0.1.0-beta.6 to 1.0.0
@@ -15,4 +15,3 @@ /** | ||
var screenReaderTextStyle = 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;'; | ||
container.setAttribute('style', screenReaderTextStyle); | ||
container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); | ||
container.setAttribute('aria-live', ariaLive); | ||
@@ -19,0 +18,0 @@ container.setAttribute('aria-relevant', 'additions text'); |
@@ -20,4 +20,3 @@ 'use strict'; | ||
var screenReaderTextStyle = 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;'; | ||
container.setAttribute('style', screenReaderTextStyle); | ||
container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); | ||
container.setAttribute('aria-live', ariaLive); | ||
@@ -24,0 +23,0 @@ container.setAttribute('aria-relevant', 'additions text'); |
{ | ||
"name": "@wordpress/a11y", | ||
"version": "0.1.0-beta.6", | ||
"version": "1.0.0", | ||
"description": "Collection of JS modules and tools for WordPress development", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/WordPress/packages/tree/master/packages/a11y/README.md", |
@@ -15,4 +15,15 @@ /** | ||
let screenReaderTextStyle = 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;'; | ||
container.setAttribute( 'style', screenReaderTextStyle ); | ||
container.setAttribute( 'style', ( | ||
'position: absolute;' + | ||
'margin: -1px;' + | ||
'padding: 0;' + | ||
'height: 1px;' + | ||
'width: 1px;' + | ||
'overflow: hidden;' + | ||
'clip: rect(1px, 1px, 1px, 1px);' + | ||
'-webkit-clip-path: inset(50%);' + | ||
'clip-path: inset(50%);' + | ||
'border: 0;' + | ||
'word-wrap: normal !important;' | ||
) ); | ||
container.setAttribute( 'aria-live', ariaLive ); | ||
@@ -19,0 +30,0 @@ container.setAttribute( 'aria-relevant', 'additions text' ); |
@@ -11,3 +11,3 @@ import addContainer from '../addContainer'; | ||
expect( container.id ).toBe( 'a11y-speak-polite' ); | ||
expect( container.getAttribute( 'style' ) ).toBe( 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;' ); | ||
expect( container.getAttribute( 'style' ) ).not.toBeNull(); | ||
expect( container.getAttribute( 'aria-live' ) ).toBe( 'polite' ); | ||
@@ -26,3 +26,3 @@ expect( container.getAttribute( 'aria-relevant' ) ).toBe( 'additions text' ); | ||
expect( container.id ).toBe( 'a11y-speak-assertive' ); | ||
expect( container.getAttribute( 'style' ) ).toBe( 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;' ); | ||
expect( container.getAttribute( 'style' ) ).not.toBeNull(); | ||
expect( container.getAttribute( 'aria-live' ) ).toBe( 'assertive' ); | ||
@@ -41,3 +41,3 @@ expect( container.getAttribute( 'aria-relevant' ) ).toBe( 'additions text' ); | ||
expect( container.id ).toBe( 'a11y-speak-polite' ); | ||
expect( container.getAttribute( 'style' ) ).toBe( 'clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden; word-wrap: normal;' ); | ||
expect( container.getAttribute( 'style' ) ).not.toBeNull(); | ||
expect( container.getAttribute( 'aria-live' ) ).toBe( 'polite' ); | ||
@@ -44,0 +44,0 @@ expect( container.getAttribute( 'aria-relevant' ) ).toBe( 'additions text' ); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
471
0
21610