base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[useButton] Default `tabIndex` to `0`

Open atomiks opened this issue 6 months ago • 2 comments

Modern Safari allows buttons to receive focus upon click/mousedown if they have a tabIndex of 0. This ensures the :focus-visible style won't appear once focus moves to a popup.

https://github.com/mui/base-ui/pull/1846#issuecomment-2887579218

atomiks avatar May 19 '25 04:05 atomiks

Open in StackBlitz

npm i https://pkg.pr.new/@base-ui-components/react@1939

commit: a40e289

pkg-pr-new[bot] avatar May 19 '25 04:05 pkg-pr-new[bot]

Deploy Preview for base-ui ready!

Name Link
Latest commit a40e28998ba0d53e16b3726878d418fb37f928a2
Latest deploy log https://app.netlify.com/projects/base-ui/deploys/682bc8b9cf54c60008a9045a
Deploy Preview https://deploy-preview-1939--base-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar May 19 '25 04:05 netlify[bot]