]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add `tabindex="0"` whenever `.overflow-*-{auto|scroll}` are used for a11y
authorJulien Déramond <juderamond@gmail.com>
Tue, 25 Jul 2023 12:54:53 +0000 (14:54 +0200)
committerJulien Déramond <juderamond@gmail.com>
Tue, 25 Jul 2023 12:55:14 +0000 (14:55 +0200)
site/content/docs/5.3/examples/cheatsheet-rtl/index.html
site/content/docs/5.3/examples/dashboard-rtl/index.html
site/content/docs/5.3/examples/dashboard/index.html
site/content/docs/5.3/utilities/overflow.md

index 9fd24e2e0b969986a86a203ee1f8e45eb50d2555..6ed0040fbeba750eeb12ad53ae894b22e40a3655 100644 (file)
@@ -1454,7 +1454,7 @@ direction: rtl
               </li>
             </ul>
           </nav>
-          <div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example position-relative mt-2 overflow-auto">
+          <div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="0" class="scrollspy-example position-relative mt-2 overflow-auto" tabindex="0">
             <h4 id="fat"><bdi lang="en" dir="ltr">@fat</bdi></h4>
             <p>محتوى لتوضيح كيف تعمل المخطوطة. ببساطة، المخطوطة عبارة عن منشور طويل يحتوي على عدة أقسام، ولديه شريط تنقل يسهل الوصول إلى هذه الأقسام الفرعية.</p>
             <h4 id="mdo"><bdi lang="en" dir="ltr">@mdo</bdi></h4>
index 6fb4a63aa903b1f26157608ecb822a1949d7da1b..cbf30b75e7a691cba7cbb45ca6952bc825ff855d 100644 (file)
@@ -90,7 +90,7 @@ extra_js:
           <h5 class="offcanvas-title" id="sidebarMenuLabel">Company name</h5>
           <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#sidebarMenu" aria-label="يغلق"></button>
         </div>
-        <div class="offcanvas-body d-md-flex flex-column p-0 pt-lg-3 overflow-y-auto">
+        <div class="offcanvas-body d-md-flex flex-column p-0 pt-lg-3 overflow-y-auto" tabindex="0">
           <ul class="nav flex-column">
             <li class="nav-item">
               <a class="nav-link d-flex align-items-center gap-2 active" aria-current="page" href="#">
index db84bd68d99913e0b72591b11ffa0c1a3993eeb8..96f8df6901e059ad04e9c10f8f7e9d60432f1927 100644 (file)
@@ -89,7 +89,7 @@ extra_js:
           <h5 class="offcanvas-title" id="sidebarMenuLabel">Company name</h5>
           <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#sidebarMenu" aria-label="Close"></button>
         </div>
-        <div class="offcanvas-body d-md-flex flex-column p-0 pt-lg-3 overflow-y-auto">
+        <div class="offcanvas-body d-md-flex flex-column p-0 pt-lg-3 overflow-y-auto" tabindex="0">
           <ul class="nav flex-column">
             <li class="nav-item">
               <a class="nav-link d-flex align-items-center gap-2 active" aria-current="page" href="#">
index 9c8573c3332c617b6f5356d6541e4b1028200eb7..e36452d22daf1bd708f4e94901a009f2599f374b 100644 (file)
@@ -11,7 +11,7 @@ toc: true
 Adjust the `overflow` property on the fly with four default values and classes. These classes are not responsive by default.
 
 <div class="bd-example d-md-flex">
-  <div class="overflow-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;">
+  <div class="overflow-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;" tabindex="0">
     This is an example of using <code>.overflow-auto</code> on an element with set width and height dimensions. By design, this content will vertically scroll.
   </div>
   <div class="overflow-hidden p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;">
@@ -20,16 +20,16 @@ Adjust the `overflow` property on the fly with four default values and classes.
   <div class="overflow-visible p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;">
     This is an example of using <code>.overflow-visible</code> on an element with set width and height dimensions.
   </div>
-  <div class="overflow-scroll p-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;">
+  <div class="overflow-scroll p-3 bg-body-tertiary" style="max-width: 260px; max-height: 100px;" tabindex="0">
     This is an example of using <code>.overflow-scroll</code> on an element with set width and height dimensions.
   </div>
 </div>
 
 ```html
-<div class="overflow-auto">...</div>
+<div class="overflow-auto" tabindex="0">...</div>
 <div class="overflow-hidden">...</div>
 <div class="overflow-visible">...</div>
-<div class="overflow-scroll">...</div>
+<div class="overflow-scroll" tabindex="0">...</div>
 ```
 
 ### `overflow-x`
@@ -37,7 +37,7 @@ Adjust the `overflow` property on the fly with four default values and classes.
 Adjust the `overflow-x` property to affect the overflow of content horizontally.
 
 <div class="bd-example d-md-flex">
-  <div class="overflow-x-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px; white-space: nowrap;">
+  <div class="overflow-x-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px; white-space: nowrap;" tabindex="0">
     <div><code>.overflow-x-auto</code> example on an element</div>
     <div> with set width and height dimensions.</div>
   </div>
@@ -49,17 +49,17 @@ Adjust the `overflow-x` property to affect the overflow of content horizontally.
     <div><code>.overflow-x-visible</code> example </div>
     <div>on an element with set width and height dimensions.</div>
   </div>
-  <div class="overflow-x-scroll p-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;white-space: nowrap;">
+  <div class="overflow-x-scroll p-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;white-space: nowrap;"  tabindex="0">
     <div><code>.overflow-x-scroll</code> example on an element</div>
     <div> with set width and height dimensions.</div>
   </div>
 </div>
 
 ```html
-<div class="overflow-x-auto">...</div>
+<div class="overflow-x-auto" tabindex="0">...</div>
 <div class="overflow-x-hidden">...</div>
 <div class="overflow-x-visible">...</div>
-<div class="overflow-x-scroll">...</div>
+<div class="overflow-x-scroll" tabindex="0">...</div>
 ```
 
 ### `overflow-y`
@@ -67,7 +67,7 @@ Adjust the `overflow-x` property to affect the overflow of content horizontally.
 Adjust the `overflow-y` property to affect the overflow of content vertically.
 
 <div class="bd-example d-md-flex">
-  <div class="overflow-y-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;">
+  <div class="overflow-y-auto p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;"  tabindex="0">
     <code>.overflow-y-auto</code> example on an element with set width and height dimensions.
   </div>
   <div class="overflow-y-hidden p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;">
@@ -76,16 +76,16 @@ Adjust the `overflow-y` property to affect the overflow of content vertically.
   <div class="overflow-y-visible p-3 mb-3 mb-md-0 me-md-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;">
     <code>.overflow-y-visible</code> example on an element with set width and height dimensions.
   </div>
-  <div class="overflow-y-scroll p-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;">
+  <div class="overflow-y-scroll p-3 bg-body-tertiary w-100" style="max-width: 200px; max-height: 100px;" tabindex="0">
     <code>.overflow-y-scroll</code> example on an element with set width and height dimensions.
   </div>
 </div>
 
 ```html
-<div class="overflow-y-auto">...</div>
+<div class="overflow-y-auto" tabindex="0">...</div>
 <div class="overflow-y-hidden">...</div>
 <div class="overflow-y-visible">...</div>
-<div class="overflow-y-scroll">...</div>
+<div class="overflow-y-scroll" tabindex="0">...</div>
 ```
 
 Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`.