Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: implement htmlcs runner for pa11y-ci #1677

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
812153e
Try to add code-sniffer to pa11y-ci
louismaximepiton Dec 5, 2022
3eb0467
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Jan 18, 2023
9108d61
fix
louismaximepiton Jan 18, 2023
65c6daa
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Feb 21, 2023
bb193f0
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Mar 16, 2023
ad185d8
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Mar 16, 2023
62842fd
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Mar 21, 2023
83359ef
Change because of losing `position: absolute`
louismaximepiton Mar 21, 2023
d2ecc1c
Merge branch 'main' into main-lmp-use-htmlcs-runner
MewenLeHo Apr 7, 2023
172f8a2
fix(review)
louismaximepiton Apr 11, 2023
af6a13a
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Apr 13, 2023
4ca39a3
.
louismaximepiton Apr 13, 2023
f48f9b9
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Apr 25, 2023
a94e6d5
.
louismaximepiton Apr 25, 2023
7549e72
.
louismaximepiton Apr 26, 2023
fbd7493
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Jul 26, 2023
62405c8
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Jul 27, 2023
bc35bf4
Fix CI
louismaximepiton Jul 27, 2023
e97f39f
Correct the documentation and remove some hiddenElements.
louismaximepiton Aug 1, 2023
32f7e7b
Remove a.active
louismaximepiton Aug 1, 2023
fbce375
Remove a.disabled
louismaximepiton Aug 1, 2023
4885f5d
Remove .page-item.disabled
louismaximepiton Aug 1, 2023
d9e2bb2
Remove offcanvas
louismaximepiton Aug 1, 2023
a9a042d
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Aug 1, 2023
f1c2caa
Remove useless accordion rule
louismaximepiton Aug 1, 2023
49fc609
Remove `a.text-decoration-none`
louismaximepiton Aug 2, 2023
3cfd5f2
Remove `.overflow-*` hidden elements and replace them with `.exclude-…
louismaximepiton Aug 2, 2023
01ae7e2
Remove `.table-responsive`
louismaximepiton Aug 2, 2023
b2f1b3b
Explanations about the exclude-from-pa11y-analysis
louismaximepiton Aug 2, 2023
aa6db67
Small patch
louismaximepiton Aug 2, 2023
d94b67e
fix(review)
louismaximepiton Aug 4, 2023
c9646bd
Add a visually-hidden label
louismaximepiton Aug 7, 2023
44883e3
After talking to a11y expert
louismaximepiton Aug 22, 2023
bd320ee
Merge branch 'main' into main-lmp-use-htmlcs-runner
louismaximepiton Jan 4, 2024
8ec6f59
fix ?
louismaximepiton Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build/.pa11yci.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
["pa11y-ci-reporter-html", {"destination": ".pa11y", "includeZeroIssues": true}]
],
"runners": [
"axe"
"axe",
"htmlcs"
],
"useIncognitoBrowserContext": false,
"hideElements": "iframe, #text-decoration + p + div a.text-decoration-none, .accordion-collapse, #offcanvas, #offcanvasDark, #offcanvasResponsive, #bdSidebar, .overflow-y-scroll, .overflow-y-auto, .overflow-x-scroll, .overflow-x-auto, .table-responsive",
"hideElements": "iframe, .table-dark .table-active, caption.visually-hidden, .table-responsive, :disabled + label, .is-disabled, .exclude-from-pa11y-analysis",
"ignore": [
"color-contrast"
louismaximepiton marked this conversation as resolved.
Show resolved Hide resolved
]
Expand Down
2 changes: 1 addition & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ $initialism-font-size: $small-font-size !default;

$blockquote-margin-y: $spacer !default;
$blockquote-font-size: $font-size-xlg !default;
$blockquote-footer-color: $gray-700 !default;
$blockquote-footer-color: var(--#{$prefix}secondary-color) !default; // Boosted mod: instead of `$gray-600`
$blockquote-footer-font-size: $small-font-size !default;
$blockquote-line-height: 1.5 !default; // Boosted mod
$blockquote-letter-spacing: $letter-spacing-base * .25 !default; // Boosted mod
Expand Down
4 changes: 2 additions & 2 deletions site/assets/js/code-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
const btnHtml = [
'<div class="bd-code-snippet">',
' <div class="bd-clipboard">',
' <button type="button" class="btn-clipboard">',
' <svg class="bi" role="img" aria-label="Copy"><use xlink:href="#clipboard"/></svg>',
' <button type="button" class="btn-clipboard" title="Copied to clipboard">',
' <svg class="bi" aria-hidden="true" focusable="false"><use xlink:href="#clipboard"/></svg>',
' </button>',
' </div>',
'</div>'
Expand Down
2 changes: 1 addition & 1 deletion site/assets/js/tac.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
const toggle = document
.createRange()
.createContextualFragment(
`<div class="form-check form-switch my-2 my-lg-0"><input class="form-check-input ms-0" type="checkbox" id="googletagmanagerAllowed" aria-describedby="tacCLgoogletagmanager" onchange="${choiceEvent}"${((document.cookie.match(/^(?:.*;)?\s*cookie-consent\s*=\s*([^;]+)(?:.*)?$/) || [null])[1].match('!googletagmanager=true') ? 'checked' : '')}><label class="form-check-label visually-hidden" for="googletagmanagerAllowed">Google Tag Manager</label><input id="googletagmanagerDenied" class="d-none"></div>`
`<div class="form-check form-switch my-2 my-lg-0"><input class="form-check-input ms-0" type="checkbox" id="googletagmanagerAllowed" aria-describedby="tacCLgoogletagmanager" onchange="${choiceEvent}"${((document.cookie.match(/^(?:.*;)?\s*cookie-consent\s*=\s*([^;]+)(?:.*)?$/) || [null])[1].match('!googletagmanager=true') ? 'checked' : '')}><label class="form-check-label visually-hidden" for="googletagmanagerAllowed">Google Tag Manager Allowed</label><input id="googletagmanagerDenied" class="d-none"><label class="d-none" for="googletagmanagerDenied">Google Tag Manager Denied</label></div>`
)
ask.innerHTML = ''
ask.append(toggle)
Expand Down
6 changes: 3 additions & 3 deletions site/assets/scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@

// scss-docs-start custom-color-mode
[data-bs-theme="blue"] {
--bs-body-color: var(--bs-white);
--bs-body-color-rgb: #{to-rgb($white)};
--bs-body-color: var(--bs-black); // Boosted mod: instead of `var(--bs-white)`
--bs-body-color-rgb: #{to-rgb($black)}; // Boosted mod: instead of `#{to-rgb($white)}`
--bs-body-bg: var(--bs-blue);
--bs-body-bg-rgb: #{to-rgb($blue)};
--bs-tertiary-bg: #{$blue-600};
Expand All @@ -116,7 +116,7 @@
}

.btn-secondary {
--bs-btn-color: var(--bs-white); // Boosted mod
--bs-btn-color: var(--bs-dark); // Boosted mod
--bs-btn-bg: #{mix($gray-600, $blue-400, .5)};
--bs-btn-border-color: #{rgba($white, .25)};
--bs-btn-hover-bg: #{darken(mix($gray-600, $blue-400, .5), 5%)};
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/components/list-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ You can use `.stretched-link` on `<label>`s to make the whole list group item cl
{{< added-in "5.2.1" >}}

{{< callout warning >}}
Dark variant won't support [contextual classes](#contextual-classes) until next release.
Dark variant won't support [variants](#variants) until next release.
{{< /callout >}}

Add `.list-group-dark` to the `.list-group` for a dark variant.
Expand Down
24 changes: 14 additions & 10 deletions site/content/docs/5.3/components/navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The `.navbar-brand` can be used to contain most elements, but an anchor works be

### Nav

Navbar navigation links build on our `.nav` options with their own modifier class and require the use of [toggler classes](#toggler) for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned.
Navbar navigation links build on our `.nav` options with their own modifier class and require the use of toggler classes for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned.

Add the `.active` class on `.nav-link` to indicate the current page.

Expand Down Expand Up @@ -271,6 +271,7 @@ Input groups work, too. If your navbar is an entire form, or mostly a form, you
<span class="input-group-text text-white" id="basic-addon1">@</span>
<input type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
</div>
<button class="btn btn-primary btn-inverse" type="submit">Search</button>
</form>
</nav>
{{< /example >}}
Expand All @@ -279,10 +280,10 @@ Various buttons are supported as part of these navbar forms, too. This is also a

{{< example >}}
<nav class="navbar navbar-dark bg-dark">
<form class="container-fluid justify-content-start align-items-center">
<div class="container-fluid justify-content-start align-items-center">
<button class="btn btn-primary btn-inverse me-2" type="button">Main button</button>
<button class="btn btn-sm btn-primary btn-inverse" type="button">Smaller button</button>
</form>
</div>
</nav>
{{< /example >}}

Expand Down Expand Up @@ -539,7 +540,7 @@ In the example below, to create an offcanvas navbar that is always collapsed acr
<button class="navbar-toggler ms-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<section class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasNavbarLabel">Offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"></button>
Expand Down Expand Up @@ -571,7 +572,7 @@ In the example below, to create an offcanvas navbar that is always collapsed acr
<button class="btn btn-primary" type="submit">Search</button>
</form>
</div>
</div>
</section>
</div>
</nav>
{{< /example >}}
Expand All @@ -583,9 +584,9 @@ To create an offcanvas navbar that expands into a normal navbar at a specific br
<button class="navbar-toggler ms-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#navbarOffcanvasLg" aria-controls="navbarOffcanvasLg" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="navbarOffcanvasLg" aria-labelledby="navbarOffcanvasLgLabel">
<section class="offcanvas offcanvas-end" tabindex="-1" id="navbarOffcanvasLg" aria-labelledby="navbarOffcanvasLgLabel">
...
</div>
</section>
</nav>
```

Expand All @@ -594,11 +595,14 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
{{< example stackblitz_add_js="true" >}}
<nav class="navbar navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">Offcanvas dark navbar</a>
<div class="navbar-brand">
<a class="stretched-link" href="#"><span class="visually-hidden">Brand</span></a>
<h1 class="title">Offcanvas dark navbar</h1>
</div>
<button class="navbar-toggler ms-auto" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasDarkNavbar" aria-labelledby="offcanvasDarkNavbarLabel">
<section class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasDarkNavbar" aria-labelledby="offcanvasDarkNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasDarkNavbarLabel">Dark offcanvas</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"></button>
Expand Down Expand Up @@ -630,7 +634,7 @@ When using offcanvas in a dark navbar, be aware that you may need to have a dark
<button class="btn btn btn-primary btn-inverse" type="submit">Search</button>
</form>
</div>
</div>
</section>
</div>
</nav>
{{< /example >}}
Expand Down
40 changes: 20 additions & 20 deletions site/content/docs/5.3/components/offcanvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Below is an offcanvas example that is shown by default (via `.show` on `.offcanv

<!--Boosted mod: replace aria-label="Close" with a visually hidden span (a11y)-->
{{< example class="bd-example-offcanvas p-0 bg-body-tertiary overflow-hidden" stackblitz_add_js="true" >}}
<div class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
<section class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
Content for the offcanvas goes here. You can place just about any Boosted component or custom elements here.
</div>
</div>
</section>
{{< /example >}}

### Live demo
Expand All @@ -60,7 +60,7 @@ You can use a link with the `href` attribute, or a button with the `data-bs-targ
Button with data-bs-target
</button>

<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<section class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
Expand All @@ -80,7 +80,7 @@ You can use a link with the `href` attribute, or a button with the `data-bs-targ
</ul>
</div>
</div>
</div>
</section>
{{< /example >}}

### Body scrolling
Expand All @@ -91,15 +91,15 @@ Scrolling the `<body>` element is disabled when an offcanvas and its backdrop ar
{{< example stackblitz_add_js="true" >}}
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling" aria-controls="offcanvasScrolling">Enable body scrolling</button>

<div class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel">
<section class="offcanvas offcanvas-start" data-bs-scroll="true" data-bs-backdrop="false" tabindex="-1" id="offcanvasScrolling" aria-labelledby="offcanvasScrollingLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasScrollingLabel">Offcanvas with body scrolling</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
<p>Try scrolling the rest of the page to see this option in action.</p>
</div>
</div>
</section>
{{< /example >}}

### Body scrolling and backdrop
Expand All @@ -110,15 +110,15 @@ You can also enable `<body>` scrolling with a visible backdrop.
{{< example stackblitz_add_js="true" >}}
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBothOptions" aria-controls="offcanvasWithBothOptions">Enable both scrolling & backdrop</button>

<div class="offcanvas offcanvas-start" data-bs-scroll="true" tabindex="-1" id="offcanvasWithBothOptions" aria-labelledby="offcanvasWithBothOptionsLabel">
<section class="offcanvas offcanvas-start" data-bs-scroll="true" tabindex="-1" id="offcanvasWithBothOptions" aria-labelledby="offcanvasWithBothOptionsLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasWithBothOptionsLabel">Backdrop with scrolling</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
<p>Try scrolling the rest of the page to see this option in action.</p>
</div>
</div>
</section>
{{< /example >}}


Expand All @@ -131,7 +131,7 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi
Toggle static offcanvas
</button>

<div class="offcanvas offcanvas-start" data-bs-backdrop="static" tabindex="-1" id="staticBackdrop" aria-labelledby="staticBackdropLabel">
<section class="offcanvas offcanvas-start" data-bs-backdrop="static" tabindex="-1" id="staticBackdrop" aria-labelledby="staticBackdropLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="staticBackdropLabel">Offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
Expand All @@ -141,7 +141,7 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi
I will not close if you click outside of me.
</div>
</div>
</div>
</section>
{{< /example >}}

## Dark offcanvas
Expand All @@ -151,15 +151,15 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi
Change the appearance of offcanvases with utilities to better match them to different contexts like dark navbars. Here we add `.text-bg-dark` to the `.offcanvas` and `.btn-close-white` to `.btn-close` for proper styling with a dark offcanvas. If you have dropdowns within, consider also adding `.dropdown-menu-dark` to `.dropdown-menu`.

{{< example class="bd-example-offcanvas p-0 bg-body-tertiary overflow-hidden" stackblitz_add_js="true" >}}
<div class="offcanvas offcanvas-start show text-bg-dark" tabindex="-1" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
<section class="offcanvas offcanvas-start show text-bg-dark" tabindex="-1" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasDarkLabel">Offcanvas</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvasDark" aria-label="Close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"></button>
</div>
<div class="offcanvas-body">
<p>Place offcanvas content here.</p>
</div>
</div>
</section>
{{< /example >}}

## Responsive
Expand All @@ -173,15 +173,15 @@ Responsive offcanvas classes hide content outside the viewport from a specified

<div class="alert alert-info d-none d-lg-block">Resize your browser to show the responsive offcanvas toggle.</div>

<div class="offcanvas-lg offcanvas-end" tabindex="-1" id="offcanvasResponsive" aria-labelledby="offcanvasResponsiveLabel">
<section class="offcanvas-lg offcanvas-end" tabindex="-1" id="offcanvasResponsive" aria-labelledby="offcanvasResponsiveLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasResponsiveLabel">Responsive offcanvas</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#offcanvasResponsive" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
<p class="mb-0">This is content within an <code>.offcanvas-lg</code>.</p>
</div>
</div>
</section>
{{< /example >}}

Responsive offcanvas classes are available across for each breakpoint.
Expand All @@ -208,45 +208,45 @@ Try the top, right, and bottom examples out below.
{{< example stackblitz_add_js="true" >}}
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasTop" aria-controls="offcanvasTop">Toggle top offcanvas</button>

<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel">
<section class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasTopLabel">Offcanvas top</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
...
</div>
</div>
</section>
{{< /example >}}

<!--Boosted mod: replace aria-label="Close" with a visually hidden span (a11y)-->
{{< example stackblitz_add_js="true" >}}
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasRight" aria-controls="offcanvasRight">Toggle right offcanvas</button>

<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
<section class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasRightLabel">Offcanvas right</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body">
...
</div>
</div>
</section>
{{< /example >}}

<!--Boosted mod: replace aria-label="Close" with a visually hidden span (a11y)-->
{{< example stackblitz_add_js="true" >}}
<button class="btn btn-primary" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasBottom" aria-controls="offcanvasBottom">Toggle bottom offcanvas</button>

<div class="offcanvas offcanvas-bottom" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel">
<section class="offcanvas offcanvas-bottom" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasBottomLabel">Offcanvas bottom</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"><span class="visually-hidden">Close</span></button>
</div>
<div class="offcanvas-body small">
...
</div>
</div>
</section>
{{< /example >}}

## Accessibility
Expand Down
Loading