agroptima-design-system 0.37.2-beta.0 → 0.37.3

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": "agroptima-design-system",
3
- "version": "0.37.2-beta.0",
3
+ "version": "0.37.3",
4
4
  "scripts": {
5
5
  "dev": "npm run storybook",
6
6
  "storybook": "storybook dev -p 6006 --ci",
@@ -46,7 +46,7 @@ export function Checkbox({
46
46
  type="checkbox"
47
47
  className="checkbox"
48
48
  disabled={disabled}
49
- aria-label={accessibilityLabel}
49
+ aria-label={accessibilityLabel || `${name} checkbox`}
50
50
  {...props}
51
51
  />
52
52
  <Label
@@ -54,8 +54,9 @@ export function Checkbox({
54
54
  required={props.required}
55
55
  disabled={disabled}
56
56
  className={classNames({ 'visually-hidden': hideLabel })}
57
+ aria-labelledby={identifier}
57
58
  >
58
- {children || accessibilityLabel}
59
+ {children}
59
60
  </Label>
60
61
  </div>
61
62
  )
@@ -4,7 +4,11 @@ import { Meta } from "@storybook/blocks";
4
4
 
5
5
  # Changelog
6
6
 
7
- ## 0.37.1
7
+ ## 0.37.3
8
+
9
+ * Fix Checkbox accessibilityLabel wrong use
10
+
11
+ ## 0.37.2
8
12
 
9
13
  * Add Divider version without title
10
14
 
@@ -4,7 +4,7 @@ import { IconButton } from '../src/atoms/Button'
4
4
  import { Divider } from '../src/atoms/Divider'
5
5
 
6
6
  describe('Divider', () => {
7
- it('renders', () => {
7
+ it('renders with title', () => {
8
8
  const { getByRole, getByText, container } = render(
9
9
  <Divider title="A title divider" icon="Line" />,
10
10
  )
@@ -44,4 +44,10 @@ describe('Divider', () => {
44
44
  expect(getByText('A title divider with button')).toBeInTheDocument()
45
45
  expect(handleClick).toHaveBeenCalledTimes(1)
46
46
  })
47
+
48
+ it('renders without title nor icon', () => {
49
+ const { getByRole, container } = render(<Divider />)
50
+ expect(getByRole('separator')).toHaveClass('divider primary')
51
+ expect(container.querySelector('.long.line')).toBeInTheDocument()
52
+ })
47
53
  })