Skip to content

Commit

Permalink
fix: SplitButton menuButton is at least 24px wide (microsoft#32309)
Browse files Browse the repository at this point in the history
  • Loading branch information
smhigley authored Aug 26, 2024
1 parent 6bc0d22 commit 99348c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: medium and large SplitButton menuButton is at least 24px wide",
"packageName": "@fluentui/react-button",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export const splitButtonClassNames: SlotClassNames<SplitButtonSlots> = {
primaryActionButton: 'fui-SplitButton__primaryActionButton',
};

// WCAG minimum target size for pointer targets that are immediately adjacent to other targets:
// https://w3c.github.io/wcag/guidelines/22/#target-size-minimum
const MIN_TARGET_SIZE = '24px';

const useFocusStyles = makeStyles({
primaryActionButton: createCustomFocusIndicatorStyle({
borderTopRightRadius: 0,
Expand Down Expand Up @@ -40,7 +44,7 @@ const useRootStyles = makeStyles({
borderLeftWidth: 0,
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
minWidth: 0,
minWidth: MIN_TARGET_SIZE,
},
},

Expand Down

0 comments on commit 99348c8

Please sign in to comment.