From 1e4ad05d6ab7be3dc83c8818f552e0dce2fb274f Mon Sep 17 00:00:00 2001 From: Hashim1999164 Date: Thu, 23 Jul 2026 21:54:16 +0500 Subject: [PATCH] docs: hide placeholder select options from assistive tech Add aria-hidden="true" to default placeholder options in form docs so screen readers do not vocalize hint text when focus enters a select. Fixes #37614 --- js/tests/visual/floating-label.html | 36 +++++++++---------- .../examples/cheatsheet-rtl/index.astro | 8 ++--- .../assets/examples/cheatsheet/index.astro | 8 ++--- .../content/docs/forms/floating-labels.mdx | 6 ++-- site/src/content/docs/forms/input-group.mdx | 8 ++--- site/src/content/docs/forms/layout.mdx | 8 ++--- site/src/content/docs/forms/select.mdx | 12 +++---- site/src/content/docs/forms/validation.mdx | 8 ++--- 8 files changed, 47 insertions(+), 47 deletions(-) diff --git a/js/tests/visual/floating-label.html b/js/tests/visual/floating-label.html index cfd40664c436..6f64ab29941e 100644 --- a/js/tests/visual/floating-label.html +++ b/js/tests/visual/floating-label.html @@ -75,7 +75,7 @@
- + @@ -93,7 +93,7 @@
- + @@ -123,7 +123,7 @@
- + @@ -170,7 +170,7 @@
- + @@ -188,7 +188,7 @@
- + @@ -274,7 +274,7 @@
- + @@ -292,7 +292,7 @@
- + @@ -334,7 +334,7 @@
- + @@ -369,7 +369,7 @@
- + diff --git a/site/src/assets/examples/cheatsheet-rtl/index.astro b/site/src/assets/examples/cheatsheet-rtl/index.astro index 6dd4001fe44e..edcc2f9fa044 100644 --- a/site/src/assets/examples/cheatsheet-rtl/index.astro +++ b/site/src/assets/examples/cheatsheet-rtl/index.astro @@ -343,7 +343,7 @@ import Placeholder from "@shortcodes/Placeholder.astro"
- + @@ -468,7 +468,7 @@ import Placeholder from "@shortcodes/Placeholder.astro"
- +
diff --git a/site/src/assets/examples/cheatsheet/index.astro b/site/src/assets/examples/cheatsheet/index.astro index 3081df2b9c23..474ea9a5f883 100644 --- a/site/src/assets/examples/cheatsheet/index.astro +++ b/site/src/assets/examples/cheatsheet/index.astro @@ -327,7 +327,7 @@ export const body_class = 'bg-body-tertiary'
- + @@ -449,7 +449,7 @@ export const body_class = 'bg-body-tertiary'
- +
diff --git a/site/src/content/docs/forms/floating-labels.mdx b/site/src/content/docs/forms/floating-labels.mdx index 65cf762258b9..bf3a8ba2b576 100644 --- a/site/src/content/docs/forms/floating-labels.mdx +++ b/site/src/content/docs/forms/floating-labels.mdx @@ -57,7 +57,7 @@ Other than `.form-control`, floating labels are only available on `.form-select` - + @@ -143,7 +143,7 @@ When working with the Bootstrap grid system, be sure to place form elements with
- + @@ -248,7 +248,7 @@ Input groups include support for custom selects and custom file inputs. Browser
- + @@ -268,7 +268,7 @@ Input groups include support for custom selects and custom file inputs. Browser
- +
@@ -214,7 +214,7 @@ The example below uses a flexbox utility to vertically center the contents and c
- + @@ -285,7 +285,7 @@ Use the `.row-cols-*` classes to create responsive horizontal layouts. By adding
` menus need only a custom class, `.form-select` to trigger the custom styles. Custom styles are limited to the `` menus need only a custom class, `.form-select` to trigger the You may also choose from small and large custom selects to match our similarly sized text inputs. - + - +
@@ -130,7 +130,7 @@ While these feedback styles cannot be styled with CSS, you can still customize t
@@ -194,7 +194,7 @@ To fix [issues with border radius](https://github.com/twbs/bootstrap/issues/2511
@@ -316,7 +316,7 @@ If your form layout allows it, you can swap the `.{valid|invalid}-feedback` clas