Skip to content

Commit

Permalink
chore: move tabindex to the root slot of Spinner (microsoft#31056)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi-msft authored Apr 16, 2024
1 parent 6441cd2 commit d38059f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: move tabindex to the root slot of Spinner.",
"packageName": "@fluentui/react-spinner",
"email": "ololubek@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElem
const { appearance = 'primary', labelPosition = 'after', size = contextSize ?? 'medium', delay = 0 } = props;
const baseId = useId('spinner');

const { role = 'progressbar', tabIndex, ...rest } = props;
const { role = 'progressbar', ...rest } = props;
const nativeRoot = slot.always(
getIntrinsicElementProps(
'div',
Expand Down Expand Up @@ -57,7 +57,6 @@ export const useSpinner_unstable = (props: SpinnerProps, ref: React.Ref<HTMLElem
});
const spinnerShortHand = slot.optional(props.spinner, {
renderByDefault: true,
defaultProps: { tabIndex },
elementType: 'span',
});
if (labelShorthand && nativeRoot && !nativeRoot['aria-labelledby']) {
Expand Down

0 comments on commit d38059f

Please sign in to comment.