mirror of https://github.com/twbs/bootstrap.git
Reintegrate `tabindex` integration in docs layouts
This commit is contained in:
parent
4b8f7c7c66
commit
dd4dc06843
|
@ -74,5 +74,13 @@ const mainProps = overrides?.main ?? {}
|
|||
<Scripts layout={layout} />
|
||||
|
||||
{frontmatter?.extra_js && frontmatter.extra_js.map((js) => <script is:inline async={js.async} src={js.src} />)}
|
||||
|
||||
{
|
||||
layout === 'docs' && (
|
||||
<div class="position-fixed" aria-hidden="true">
|
||||
<input type="text" tabindex="-1" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -21,7 +21,7 @@ const { frontmatter, headings, id } = Astro.props
|
|||
// Extract the directory/section from the ID (format: "directory/filename.mdx")
|
||||
const parentDirectory = id.includes('/') ? id.split('/')[0] : ''
|
||||
|
||||
const bodyProps: LayoutOverridesHTMLAttributes<'body'> = { tabindex: 0 }
|
||||
const bodyProps: LayoutOverridesHTMLAttributes<'body'> = {}
|
||||
|
||||
if (frontmatter.toc) {
|
||||
bodyProps['data-bs-spy'] = 'scroll'
|
||||
|
|
Loading…
Reference in New Issue