diff --git a/.changeset/four-carrots-divide.md b/.changeset/four-carrots-divide.md new file mode 100644 index 00000000000..8747135850e --- /dev/null +++ b/.changeset/four-carrots-divide.md @@ -0,0 +1,5 @@ +--- +"@primer/react": patch +--- + +fix(LabelGroup): add role and aria-label to hidden items overlay diff --git a/packages/react/src/LabelGroup/LabelGroup.tsx b/packages/react/src/LabelGroup/LabelGroup.tsx index 2c59e38b841..e5d5a0f1b04 100644 --- a/packages/react/src/LabelGroup/LabelGroup.tsx +++ b/packages/react/src/LabelGroup/LabelGroup.tsx @@ -70,6 +70,7 @@ const OverlayToggle: React.FC< openOverflowOverlay, overlayPaddingPx, overlayWidth, + totalLength, }) => hiddenItemIds.length ? ( )} focusZoneSettings={{disabled: true}} + overlayProps={{role: 'dialog', 'aria-label': `All ${totalLength} labels`, 'aria-modal': true}} >
{children}