Skip to content

Commit 4b84948

Browse files
authored
ActionBar: Add aria-label to role="toolbar" (#6980)
1 parent 3e67ecd commit 4b84948

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/thin-cobras-cry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': patch
3+
---
4+
5+
ActionBar: Supplies `aria-label` to toolbar inside of `ActionBar`

packages/react/src/ActionBar/ActionBar.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,13 @@ export const ActionBar: React.FC<React.PropsWithChildren<ActionBarProps>> = prop
219219
return (
220220
<ActionBarContext.Provider value={{size, registerChild, unregisterChild, isVisibleChild}}>
221221
<div ref={navRef} className={clsx(className, styles.Nav)} data-flush={flush}>
222-
<div ref={listRef} role="toolbar" className={styles.List} style={{gap: `${ACTIONBAR_ITEM_GAP}px`}}>
222+
<div
223+
ref={listRef}
224+
role="toolbar"
225+
className={styles.List}
226+
style={{gap: `${ACTIONBAR_ITEM_GAP}px`}}
227+
aria-label={ariaLabel}
228+
>
223229
{children}
224230
{menuItemIds.size > 0 && (
225231
<ActionMenu>

0 commit comments

Comments
 (0)