@moda/om 21.7.0 → 21.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "21.7.0",
3
+ "version": "21.7.1",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useId } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import ExitIcon from '@moda/icons/exit-16';
4
4
  import { FocusOn } from 'react-focus-on';
@@ -24,6 +24,8 @@ export const SlidingPane: React.FC<SlidingPaneProps> = ({
24
24
  autoFocus = true,
25
25
  ...rest
26
26
  }) => {
27
+ const titleId = useId();
28
+
27
29
  return (
28
30
  <>
29
31
  <div
@@ -40,6 +42,9 @@ export const SlidingPane: React.FC<SlidingPaneProps> = ({
40
42
  onEscapeKey={onClose}
41
43
  >
42
44
  <div
45
+ role='dialog'
46
+ aria-modal='true'
47
+ aria-labelledby={titleId}
43
48
  className={classNames('SlidingPane', className, {
44
49
  'SlidingPane--active': visible
45
50
  })}
@@ -51,7 +56,7 @@ export const SlidingPane: React.FC<SlidingPaneProps> = ({
51
56
  direction='horizontal'
52
57
  className='SlidingPane__top'
53
58
  >
54
- <Text treatment='h5' family='serif'>
59
+ <Text id={titleId} treatment='h5' family='serif'>
55
60
  {title}
56
61
  </Text>
57
62
  <Clickable className='SlidingPane__close' aria-label='Close' onClick={onClose}>