File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/react/src/LabelGroup Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @primer/react ' : patch
3+ ---
4+
5+ Changes the accessible name of the "toggle" button in ` LabelGroup ` to contain the visual label
Original file line number Diff line number Diff line change @@ -73,15 +73,14 @@ const InlineToggle: React.FC<{
7373 hiddenItemIds,
7474 isOverflowShown,
7575 showAllTokensInline,
76- totalLength,
7776} ) =>
7877 isOverflowShown ? (
7978 < Button ref = { collapseButtonRef } onClick = { collapseInlineExpandedChildren } size = "small" variant = "invisible" >
8079 Show less
8180 </ Button >
8281 ) : hiddenItemIds . length ? (
8382 < Button ref = { expandButtonRef } variant = "invisible" size = "small" onClick = { showAllTokensInline } >
84- < VisuallyHidden > Show all { totalLength } </ VisuallyHidden >
83+ < VisuallyHidden > Show + { hiddenItemIds . length } more </ VisuallyHidden >
8584 < span aria-hidden = "true" > +{ hiddenItemIds . length } </ span >
8685 </ Button >
8786 ) : null
@@ -106,7 +105,6 @@ const OverlayToggle: React.FC<
106105 openOverflowOverlay,
107106 overlayPaddingPx,
108107 overlayWidth,
109- totalLength,
110108} ) =>
111109 hiddenItemIds . length ? (
112110 < AnchoredOverlay
@@ -123,7 +121,7 @@ const OverlayToggle: React.FC<
123121 alignmentOffset = { overlayPaddingPx * - 1 }
124122 renderAnchor = { props => (
125123 < Button variant = "invisible" size = "small" { ...props } ref = { expandButtonRef } >
126- < VisuallyHidden > Show all { totalLength } </ VisuallyHidden >
124+ < VisuallyHidden > Show + { hiddenItemIds . length } more </ VisuallyHidden >
127125 < span aria-hidden = "true" > +{ hiddenItemIds . length } </ span >
128126 </ Button >
129127 ) }
You can’t perform that action at this time.
0 commit comments