@pingux/astro 2.8.0 → 2.8.1-alpha.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.
@@ -121,14 +121,16 @@ var Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
121
121
|
},
|
122
122
|
mx: "sm",
|
123
123
|
isDisabled: prevButtonProps.isDisabled,
|
124
|
-
"aria-label": "
|
124
|
+
"aria-label": "Previous year navigation"
|
125
125
|
}, (0, _react2.jsx)(_index.Icon, {
|
126
126
|
icon: _ChevronDoubleLeftIcon["default"],
|
127
127
|
size: 18,
|
128
128
|
title: {
|
129
129
|
name: 'Chevron Double Left Icon'
|
130
130
|
}
|
131
|
-
})), (0, _react2.jsx)(_index.IconButton,
|
131
|
+
})), (0, _react2.jsx)(_index.IconButton, (0, _extends2["default"])({}, prevButtonProps, {
|
132
|
+
"aria-label": "Previous month navigation"
|
133
|
+
}), (0, _react2.jsx)(_index.Icon, {
|
132
134
|
icon: _ChevronLeftIcon["default"],
|
133
135
|
size: 18,
|
134
136
|
title: {
|
@@ -139,7 +141,9 @@ var Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
139
141
|
role: "heading",
|
140
142
|
"aria-level": "3",
|
141
143
|
fontWeight: 3
|
142
|
-
}, title), (0, _react2.jsx)(_index.IconButton,
|
144
|
+
}, title), (0, _react2.jsx)(_index.IconButton, (0, _extends2["default"])({}, nextButtonProps, {
|
145
|
+
"aria-label": "Next month navigation"
|
146
|
+
}), (0, _react2.jsx)(_index.Icon, {
|
143
147
|
icon: _ChevronRightIcon["default"],
|
144
148
|
size: 18,
|
145
149
|
title: {
|
@@ -151,7 +155,7 @@ var Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
151
155
|
},
|
152
156
|
mx: "sm",
|
153
157
|
isDisabled: nextButtonProps.isDisabled,
|
154
|
-
"aria-label": "
|
158
|
+
"aria-label": "Next year navigation"
|
155
159
|
}, (0, _react2.jsx)(_index.Icon, {
|
156
160
|
icon: _ChevronDoubleRightIcon["default"],
|
157
161
|
size: 18,
|
@@ -47,8 +47,8 @@ test('renders calendar component', function () {
|
|
47
47
|
var buttons = _testWrapper.screen.queryAllByRole('button');
|
48
48
|
var previous = buttons[1];
|
49
49
|
var next = buttons[2];
|
50
|
-
expect(previous).toHaveAttribute('aria-label', 'Previous');
|
51
|
-
expect(next).toHaveAttribute('aria-label', 'Next');
|
50
|
+
expect(previous).toHaveAttribute('aria-label', 'Previous month navigation');
|
51
|
+
expect(next).toHaveAttribute('aria-label', 'Next month navigation');
|
52
52
|
expect(_testWrapper.screen.queryByRole('grid')).toHaveAttribute('aria-label', 'August 2022');
|
53
53
|
var weeksInMonth = _testWrapper.screen.getAllByRole('row');
|
54
54
|
expect(weeksInMonth).toHaveLength(5);
|
@@ -64,7 +64,7 @@ test('renders calendar component', function () {
|
|
64
64
|
expect(gridCells.length).toBe(31);
|
65
65
|
var hiddenButton = (0, _filter["default"])(_context2 = _testWrapper.screen.queryAllByRole('button')).call(_context2, function (button) {
|
66
66
|
return button.getAttribute('aria-label') === 'Next';
|
67
|
-
})[
|
67
|
+
})[0];
|
68
68
|
expect(hiddenButton).toHaveAttribute('tabindex', '-1');
|
69
69
|
_userEvent["default"].click(hiddenButton);
|
70
70
|
expect(heading).toHaveTextContent('September 2022');
|
@@ -110,14 +110,16 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
110
110
|
},
|
111
111
|
mx: "sm",
|
112
112
|
isDisabled: prevButtonProps.isDisabled,
|
113
|
-
"aria-label": "
|
113
|
+
"aria-label": "Previous year navigation"
|
114
114
|
}, ___EmotionJSX(Icon, {
|
115
115
|
icon: ChevronDoubleLeftIcon,
|
116
116
|
size: 18,
|
117
117
|
title: {
|
118
118
|
name: 'Chevron Double Left Icon'
|
119
119
|
}
|
120
|
-
})), ___EmotionJSX(IconButton,
|
120
|
+
})), ___EmotionJSX(IconButton, _extends({}, prevButtonProps, {
|
121
|
+
"aria-label": "Previous month navigation"
|
122
|
+
}), ___EmotionJSX(Icon, {
|
121
123
|
icon: ChevronLeftIcon,
|
122
124
|
size: 18,
|
123
125
|
title: {
|
@@ -128,7 +130,9 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
128
130
|
role: "heading",
|
129
131
|
"aria-level": "3",
|
130
132
|
fontWeight: 3
|
131
|
-
}, title), ___EmotionJSX(IconButton,
|
133
|
+
}, title), ___EmotionJSX(IconButton, _extends({}, nextButtonProps, {
|
134
|
+
"aria-label": "Next month navigation"
|
135
|
+
}), ___EmotionJSX(Icon, {
|
132
136
|
icon: ChevronRightIcon,
|
133
137
|
size: 18,
|
134
138
|
title: {
|
@@ -140,7 +144,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
140
144
|
},
|
141
145
|
mx: "sm",
|
142
146
|
isDisabled: nextButtonProps.isDisabled,
|
143
|
-
"aria-label": "
|
147
|
+
"aria-label": "Next year navigation"
|
144
148
|
}, ___EmotionJSX(Icon, {
|
145
149
|
icon: ChevronDoubleRightIcon,
|
146
150
|
size: 18,
|
@@ -44,8 +44,8 @@ test('renders calendar component', function () {
|
|
44
44
|
var buttons = screen.queryAllByRole('button');
|
45
45
|
var previous = buttons[1];
|
46
46
|
var next = buttons[2];
|
47
|
-
expect(previous).toHaveAttribute('aria-label', 'Previous');
|
48
|
-
expect(next).toHaveAttribute('aria-label', 'Next');
|
47
|
+
expect(previous).toHaveAttribute('aria-label', 'Previous month navigation');
|
48
|
+
expect(next).toHaveAttribute('aria-label', 'Next month navigation');
|
49
49
|
expect(screen.queryByRole('grid')).toHaveAttribute('aria-label', 'August 2022');
|
50
50
|
var weeksInMonth = screen.getAllByRole('row');
|
51
51
|
expect(weeksInMonth).toHaveLength(5);
|
@@ -61,7 +61,7 @@ test('renders calendar component', function () {
|
|
61
61
|
expect(gridCells.length).toBe(31);
|
62
62
|
var hiddenButton = _filterInstanceProperty(_context2 = screen.queryAllByRole('button')).call(_context2, function (button) {
|
63
63
|
return button.getAttribute('aria-label') === 'Next';
|
64
|
-
})[
|
64
|
+
})[0];
|
65
65
|
expect(hiddenButton).toHaveAttribute('tabindex', '-1');
|
66
66
|
userEvent.click(hiddenButton);
|
67
67
|
expect(heading).toHaveTextContent('September 2022');
|