aria-ease 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ const MenuExample = () => {
|
|
|
27
27
|
const toggleMenuDisplay = (event) => {
|
|
28
28
|
if (event.type === 'mousedown' || (event.type === 'keydown' && (event.key === 'Enter' || event.key === ' '))) {
|
|
29
29
|
event.preventDefault();
|
|
30
|
-
const menu = document.querySelector('#
|
|
30
|
+
const menu = document.querySelector('#menu-div');
|
|
31
31
|
if (getComputedStyle(menu).display === 'none') {
|
|
32
32
|
menu.style.display = 'block';
|
|
33
33
|
makeMenuAccessible('menu-div', 'menu-interactive-items');
|
|
@@ -50,7 +50,7 @@ const MenuExample = () => {
|
|
|
50
50
|
aria-expanded={false}
|
|
51
51
|
aria-controls="menu-div"
|
|
52
52
|
aria-label="Display profile menu"
|
|
53
|
-
className='menu-example-trigger-button
|
|
53
|
+
className='menu-example-trigger-button'
|
|
54
54
|
onKeyDown={toggleMenuDisplay}
|
|
55
55
|
>
|
|
56
56
|
Display Example Menu
|
|
@@ -79,13 +79,13 @@ import { makeBlockAccessible } from "aria-ease"
|
|
|
79
79
|
|
|
80
80
|
const BlockExample = () => {
|
|
81
81
|
useEffect(() => {
|
|
82
|
-
const accessibleBlock = makeBlockAccessible('block-div
|
|
82
|
+
const accessibleBlock = makeBlockAccessible('block-div', 'block-div-interactive-items');
|
|
83
83
|
return accessibleBlock;
|
|
84
84
|
},[])
|
|
85
85
|
|
|
86
86
|
return (
|
|
87
87
|
<div>
|
|
88
|
-
<div id="block-div
|
|
88
|
+
<div id="block-div">
|
|
89
89
|
<button className="block-div-interactive-items">One</button>
|
|
90
90
|
<button className="block-div-interactive-items">Two</button>
|
|
91
91
|
<button className="block-div-interactive-items">Three</button>
|