diff --git a/.changeset/forty-cars-shake.md b/.changeset/forty-cars-shake.md new file mode 100644 index 00000000000..c663cc92877 --- /dev/null +++ b/.changeset/forty-cars-shake.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +Adds the `disabled` attribute to disabled `UnstyledButton` components to prevent them from being inadvertently selected by `button:not(:disabled)` CSS selectors. diff --git a/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx b/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx index 82319b09432..d11931040f0 100644 --- a/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx +++ b/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx @@ -81,6 +81,7 @@ export function UnstyledButton({