@primer/view-components 0.31.0-rc.b32b76aa → 0.31.0-rc.cd58efcb
Sign up to get free protection for your applications and to get access to all the features.
@@ -55,6 +55,7 @@ const updateWhenVisible = (() => {
|
|
55
55
|
}));
|
56
56
|
resizeObserver.observe(el.ownerDocument.documentElement);
|
57
57
|
el.addEventListener('dialog:close', () => {
|
58
|
+
el.invokerElement?.setAttribute('aria-expanded', 'false');
|
58
59
|
anchors.delete(el);
|
59
60
|
});
|
60
61
|
el.addEventListener('dialog:open', () => {
|
@@ -252,6 +253,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
|
|
252
253
|
if (event.target === this.dialog && event.type === 'close') {
|
253
254
|
// Remove data-ready so it can be set the next time the panel is opened
|
254
255
|
this.dialog.removeAttribute('data-ready');
|
256
|
+
this.invokerElement?.setAttribute('aria-expanded', 'false');
|
255
257
|
this.dispatchEvent(new CustomEvent('panelClosed', {
|
256
258
|
detail: { panel: this },
|
257
259
|
bubbles: true,
|
@@ -301,6 +303,7 @@ let SelectPanelElement = class SelectPanelElement extends HTMLElement {
|
|
301
303
|
show() {
|
302
304
|
this.updateAnchorPosition();
|
303
305
|
this.dialog.showModal();
|
306
|
+
this.invokerElement?.setAttribute('aria-expanded', 'true');
|
304
307
|
const event = new CustomEvent('dialog:open', {
|
305
308
|
detail: { dialog: this.dialog },
|
306
309
|
});
|
@@ -424,7 +427,7 @@ _SelectPanelElement_updateTabIndices = function _SelectPanelElement_updateTabInd
|
|
424
427
|
itemContent.setAttribute('tabindex', '-1');
|
425
428
|
}
|
426
429
|
// <li> elements should not themselves be tabbable
|
427
|
-
item.
|
430
|
+
item.removeAttribute('tabindex');
|
428
431
|
}
|
429
432
|
}
|
430
433
|
else {
|
@@ -439,7 +442,7 @@ _SelectPanelElement_updateTabIndices = function _SelectPanelElement_updateTabInd
|
|
439
442
|
itemContent.setAttribute('tabindex', '-1');
|
440
443
|
}
|
441
444
|
// <li> elements should not themselves be tabbable
|
442
|
-
item.
|
445
|
+
item.removeAttribute('tabindex');
|
443
446
|
}
|
444
447
|
}
|
445
448
|
if (!setZeroTabIndex && __classPrivateFieldGet(this, _SelectPanelElement_instances, "a", _SelectPanelElement_firstItem_get)) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.31.0-rc.
|
3
|
+
"version": "0.31.0-rc.cd58efcb",
|
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/arguments.json
CHANGED
@@ -4336,9 +4336,9 @@
|
|
4336
4336
|
},
|
4337
4337
|
{
|
4338
4338
|
"name": "prefix",
|
4339
|
-
"type": "
|
4339
|
+
"type": "String",
|
4340
4340
|
"default": "`nil`",
|
4341
|
-
"description": "What to prefix the relative
|
4341
|
+
"description": "What to prefix the relative time display with."
|
4342
4342
|
},
|
4343
4343
|
{
|
4344
4344
|
"name": "second",
|
@@ -4390,7 +4390,7 @@
|
|
4390
4390
|
},
|
4391
4391
|
{
|
4392
4392
|
"name": "threshold",
|
4393
|
-
"type": "
|
4393
|
+
"type": "String",
|
4394
4394
|
"default": "`nil`",
|
4395
4395
|
"description": "The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute."
|
4396
4396
|
},
|
@@ -4414,13 +4414,13 @@
|
|
4414
4414
|
},
|
4415
4415
|
{
|
4416
4416
|
"name": "lang",
|
4417
|
-
"type": "
|
4417
|
+
"type": "String",
|
4418
4418
|
"default": "`nil`",
|
4419
4419
|
"description": "The language to use."
|
4420
4420
|
},
|
4421
4421
|
{
|
4422
4422
|
"name": "title",
|
4423
|
-
"type": "
|
4423
|
+
"type": "String",
|
4424
4424
|
"default": "`nil`",
|
4425
4425
|
"description": "Provide a custom title to the element."
|
4426
4426
|
},
|
package/static/info_arch.json
CHANGED
@@ -991,6 +991,12 @@
|
|
991
991
|
"name": "description",
|
992
992
|
"description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
|
993
993
|
"parameters": [
|
994
|
+
{
|
995
|
+
"name": "legacy_content",
|
996
|
+
"type": "String",
|
997
|
+
"default": "N/A",
|
998
|
+
"description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
|
999
|
+
},
|
994
1000
|
{
|
995
1001
|
"name": "test_selector",
|
996
1002
|
"type": "String",
|
@@ -5554,6 +5560,12 @@
|
|
5554
5560
|
"name": "description",
|
5555
5561
|
"description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
|
5556
5562
|
"parameters": [
|
5563
|
+
{
|
5564
|
+
"name": "legacy_content",
|
5565
|
+
"type": "String",
|
5566
|
+
"default": "N/A",
|
5567
|
+
"description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
|
5568
|
+
},
|
5557
5569
|
{
|
5558
5570
|
"name": "test_selector",
|
5559
5571
|
"type": "String",
|
@@ -14699,6 +14711,12 @@
|
|
14699
14711
|
"name": "description",
|
14700
14712
|
"description": "Description content that complements the item's label, with optional test_selector.\nSee `ActionList`'s `description_scheme` argument for layout options.",
|
14701
14713
|
"parameters": [
|
14714
|
+
{
|
14715
|
+
"name": "legacy_content",
|
14716
|
+
"type": "String",
|
14717
|
+
"default": "N/A",
|
14718
|
+
"description": "Slot content, provided for backwards-compatibility. Pass a content block instead, or call `with_content`, eg. `component.with_description { \"My description\" }` or `component.with_description.with_content(\"My description\")`."
|
14719
|
+
},
|
14702
14720
|
{
|
14703
14721
|
"name": "test_selector",
|
14704
14722
|
"type": "String",
|
@@ -15364,9 +15382,9 @@
|
|
15364
15382
|
},
|
15365
15383
|
{
|
15366
15384
|
"name": "prefix",
|
15367
|
-
"type": "
|
15385
|
+
"type": "String",
|
15368
15386
|
"default": "`nil`",
|
15369
|
-
"description": "What to prefix the relative
|
15387
|
+
"description": "What to prefix the relative time display with."
|
15370
15388
|
},
|
15371
15389
|
{
|
15372
15390
|
"name": "second",
|
@@ -15418,7 +15436,7 @@
|
|
15418
15436
|
},
|
15419
15437
|
{
|
15420
15438
|
"name": "threshold",
|
15421
|
-
"type": "
|
15439
|
+
"type": "String",
|
15422
15440
|
"default": "`nil`",
|
15423
15441
|
"description": "The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute."
|
15424
15442
|
},
|
@@ -15442,13 +15460,13 @@
|
|
15442
15460
|
},
|
15443
15461
|
{
|
15444
15462
|
"name": "lang",
|
15445
|
-
"type": "
|
15463
|
+
"type": "String",
|
15446
15464
|
"default": "`nil`",
|
15447
15465
|
"description": "The language to use."
|
15448
15466
|
},
|
15449
15467
|
{
|
15450
15468
|
"name": "title",
|
15451
|
-
"type": "
|
15469
|
+
"type": "String",
|
15452
15470
|
"default": "`nil`",
|
15453
15471
|
"description": "Provide a custom title to the element."
|
15454
15472
|
},
|