@primer/view-components 0.6.1-rc.1fca6dcf → 0.6.1-rc.e08ce435
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/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/components/primer/alpha/action_menu/action_menu_element.js +8 -1
- package/package.json +1 -1
- package/static/info_arch.json +0 -13
- package/static/previews.json +0 -13
@@ -141,8 +141,11 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
141
141
|
return;
|
142
142
|
const ariaChecked = item.getAttribute('aria-checked');
|
143
143
|
const checked = ariaChecked !== 'true';
|
144
|
-
item.setAttribute('aria-checked', `${checked}`);
|
145
144
|
if (this.selectVariant === 'single') {
|
145
|
+
// Only check, never uncheck here. Single-select mode does not allow unchecking a checked item.
|
146
|
+
if (checked) {
|
147
|
+
item.setAttribute('aria-checked', 'true');
|
148
|
+
}
|
146
149
|
for (const checkedItem of this.querySelectorAll('[aria-checked]')) {
|
147
150
|
if (checkedItem !== item) {
|
148
151
|
checkedItem.setAttribute('aria-checked', 'false');
|
@@ -150,6 +153,10 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
150
153
|
}
|
151
154
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_setDynamicLabel).call(this);
|
152
155
|
}
|
156
|
+
else {
|
157
|
+
// multi-select mode allows unchecking a checked item
|
158
|
+
item.setAttribute('aria-checked', `${checked}`);
|
159
|
+
}
|
153
160
|
__classPrivateFieldGet(this, _ActionMenuElement_instances, "m", _ActionMenuElement_updateInput).call(this);
|
154
161
|
if (event instanceof KeyboardEvent && event.target instanceof HTMLButtonElement) {
|
155
162
|
// prevent buttons from being clicked twice
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.6.1-rc.
|
3
|
+
"version": "0.6.1-rc.e08ce435",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|
package/static/info_arch.json
CHANGED
@@ -8411,19 +8411,6 @@
|
|
8411
8411
|
]
|
8412
8412
|
}
|
8413
8413
|
},
|
8414
|
-
{
|
8415
|
-
"preview_path": "primer/alpha/tooltip/label_tooltip_on_button_with_existing_labelledby",
|
8416
|
-
"name": "label_tooltip_on_button_with_existing_labelledby",
|
8417
|
-
"snapshot": "false",
|
8418
|
-
"skip_rules": {
|
8419
|
-
"wont_fix": [
|
8420
|
-
"region"
|
8421
|
-
],
|
8422
|
-
"will_fix": [
|
8423
|
-
"color-contrast"
|
8424
|
-
]
|
8425
|
-
}
|
8426
|
-
},
|
8427
8414
|
{
|
8428
8415
|
"preview_path": "primer/alpha/tooltip/description_tooltip_on_button_with_existing_describedby",
|
8429
8416
|
"name": "description_tooltip_on_button_with_existing_describedby",
|
package/static/previews.json
CHANGED
@@ -6158,19 +6158,6 @@
|
|
6158
6158
|
]
|
6159
6159
|
}
|
6160
6160
|
},
|
6161
|
-
{
|
6162
|
-
"preview_path": "primer/alpha/tooltip/label_tooltip_on_button_with_existing_labelledby",
|
6163
|
-
"name": "label_tooltip_on_button_with_existing_labelledby",
|
6164
|
-
"snapshot": "false",
|
6165
|
-
"skip_rules": {
|
6166
|
-
"wont_fix": [
|
6167
|
-
"region"
|
6168
|
-
],
|
6169
|
-
"will_fix": [
|
6170
|
-
"color-contrast"
|
6171
|
-
]
|
6172
|
-
}
|
6173
|
-
},
|
6174
6161
|
{
|
6175
6162
|
"preview_path": "primer/alpha/tooltip/description_tooltip_on_button_with_existing_describedby",
|
6176
6163
|
"name": "description_tooltip_on_button_with_existing_describedby",
|