diff --git a/.changeset/purple-feet-approve.md b/.changeset/purple-feet-approve.md new file mode 100644 index 0000000000..3d4fae478c --- /dev/null +++ b/.changeset/purple-feet-approve.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': minor +--- + +The 'Skip to content' button on click focus on the main article tag and skip the h1 tag. Users are not able to identify which page they are currently. Now this minor fix will change the behaviour o the button and focus on the h1 tag on the page diff --git a/packages/core-components/src/layout/Content/Content.tsx b/packages/core-components/src/layout/Content/Content.tsx index a26f74710d..f949e0d3fc 100644 --- a/packages/core-components/src/layout/Content/Content.tsx +++ b/packages/core-components/src/layout/Content/Content.tsx @@ -17,7 +17,6 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; import classNames from 'classnames'; import React, { PropsWithChildren } from 'react'; -import { useContent } from '../Sidebar'; /** @public */ export type BackstageContentClassKey = 'root' | 'stretch' | 'noPadding'; @@ -64,13 +63,9 @@ type Props = { export function Content(props: PropsWithChildren) { const { className, stretch, noPadding, children, ...restProps } = props; - const { contentRef } = useContent(); - const classes = useStyles(); return (
{ + const { contentRef } = useContent(); + const FinalTitle = ( - + {pageTitle} );