Skip to content

Commit 30cdd2e

Browse files
authored
[Layout] Box aria roles (#7956)
### WHY are these changes introduced? Supports #7952 ### WHAT is this pull request doing? Add `listbox` and `combobox` aria roles on `Box`
1 parent 4e33e1c commit 30cdd2e

File tree

3 files changed

+924
-891
lines changed

3 files changed

+924
-891
lines changed

.changeset/sixty-squids-promise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Updated `Box` allowable aria roles

polaris-react/src/components/Box/Box.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ export interface BoxProps extends React.AriaAttributes {
151151
*/
152152
paddingInlineEnd?: Spacing;
153153
/** Aria role */
154-
role?: Extract<React.AriaRole, 'status' | 'presentation' | 'menu'>;
154+
role?: Extract<
155+
React.AriaRole,
156+
'status' | 'presentation' | 'menu' | 'listbox' | 'combobox'
157+
>;
155158
/** Shadow on box */
156159
shadow?: DepthShadowAlias;
157160
/** Set tab order */

0 commit comments

Comments
 (0)