Skip to content

Commit

Permalink
Revert "Merge pull request #641 from cisagov/skip-to-main-content"
Browse files Browse the repository at this point in the history
This reverts commit fdd405f, reversing
changes made to ded4c8c.
  • Loading branch information
aloftus23 committed Oct 2, 2024
1 parent 50f6247 commit b452c68
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ export const Layout: React.FC<PropsWithChildren<ContextType>> = ({
isFilterDrawerOpen={isFilterDrawerOpen}
setIsFilterDrawerOpen={setIsFilterDrawerOpen}
/>
<div className="main-content" id="main-content" tabIndex={-1} />

<Box
id="main-content"
tabIndex={-1}
display="block"
position="relative"
flex="1"
Expand Down
30 changes: 16 additions & 14 deletions frontend/src/components/SkipToMainContent/SkipToMainContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Box, Button } from '@mui/material';
import { Box, Button, Tooltip } from '@mui/material';

export const SkipToMainContent: React.FC = () => {
const handleClick = (event: any) => {
Expand All @@ -12,19 +12,21 @@ export const SkipToMainContent: React.FC = () => {

return (
<Box sx={{ paddingLeft: 1 }}>
<Button
aria-label="Skip to main content"
variant="text"
tabIndex={0}
onClick={handleClick}
sx={{
outline: 'true',
fontSize: '0.6rem',
padding: 0
}}
>
Skip to main content
</Button>
<Tooltip title="Skip to main content" placement="right">
<Button
aria-label="Skip to main content"
variant="text"
tabIndex={0}
onClick={handleClick}
sx={{
outline: 'true',
fontSize: '0.6rem',
padding: 0
}}
>
Skip to main content
</Button>
</Tooltip>
</Box>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`Layout component matches snapshot 1`] = `
<button
aria-label="Skip to main content"
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium css-1a47txt-MuiButtonBase-root-MuiButton-root"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
Expand Down Expand Up @@ -274,13 +275,10 @@ exports[`Layout component matches snapshot 1`] = `
HEADER
</div>
<div
class="main-content"
class="MuiBox-root css-1ycota"
id="main-content"
tabindex="-1"
/>
<div
class="MuiBox-root css-1ycota"
/>
<div
class="css-1ycjho2"
>
Expand Down

0 comments on commit b452c68

Please sign in to comment.