diff --git a/docs/data/material/components/tabs/NavTabs.js b/docs/data/material/components/tabs/NavTabs.js index 6a5419209c4739..288b734b71318e 100644 --- a/docs/data/material/components/tabs/NavTabs.js +++ b/docs/data/material/components/tabs/NavTabs.js @@ -1,4 +1,5 @@ import * as React from 'react'; +import PropTypes from 'prop-types'; import Box from '@mui/material/Box'; import Tabs from '@mui/material/Tabs'; import Tab from '@mui/material/Tab'; @@ -27,11 +28,16 @@ function LinkTab(props) { event.preventDefault(); } }} + aria-current={props.selected && 'page'} {...props} /> ); } +LinkTab.propTypes = { + selected: PropTypes.bool, +}; + export default function NavTabs() { const [value, setValue] = React.useState(0); @@ -47,7 +53,12 @@ export default function NavTabs() { return ( - + diff --git a/docs/data/material/components/tabs/NavTabs.tsx b/docs/data/material/components/tabs/NavTabs.tsx index a5f897d587df7a..525feabea0698a 100644 --- a/docs/data/material/components/tabs/NavTabs.tsx +++ b/docs/data/material/components/tabs/NavTabs.tsx @@ -22,6 +22,7 @@ function samePageLinkNavigation( interface LinkTabProps { label?: string; href?: string; + selected?: boolean; } function LinkTab(props: LinkTabProps) { @@ -34,6 +35,7 @@ function LinkTab(props: LinkTabProps) { event.preventDefault(); } }} + aria-current={props.selected && 'page'} {...props} /> ); @@ -57,7 +59,12 @@ export default function NavTabs() { return ( - + diff --git a/docs/data/material/components/tabs/NavTabs.tsx.preview b/docs/data/material/components/tabs/NavTabs.tsx.preview index 6a6f7623c3adc4..586cccfc1bfee0 100644 --- a/docs/data/material/components/tabs/NavTabs.tsx.preview +++ b/docs/data/material/components/tabs/NavTabs.tsx.preview @@ -1,4 +1,9 @@ - +