From ff5a7cabd3574b074380c80ed3816834aa6eea7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Thu, 23 Mar 2023 10:09:33 +0100 Subject: [PATCH] feat(range): provide an accessible example to display the value (#1714) Co-authored-by: Louis-Maxime Piton --- site/content/docs/5.3/forms/range.md | 31 ++++++++++++++++++++++++++++ site/content/docs/5.3/migration.md | 2 ++ 2 files changed, 33 insertions(+) diff --git a/site/content/docs/5.3/forms/range.md b/site/content/docs/5.3/forms/range.md index 8c4233c4b7..58dea91019 100644 --- a/site/content/docs/5.3/forms/range.md +++ b/site/content/docs/5.3/forms/range.md @@ -50,6 +50,37 @@ By default, range inputs "snap" to integer values. To change this, you can speci {{< /example >}} +## Usability + +For better usability, it is recommended most of the time to display the current selected value. + +This requires extra JavaScript code. + +{{< example >}} +
+ + +
+ + + +{{< /example >}} + ## CSS ### Sass variables diff --git a/site/content/docs/5.3/migration.md b/site/content/docs/5.3/migration.md index 42b1f50427..53aa1a89ec 100644 --- a/site/content/docs/5.3/migration.md +++ b/site/content/docs/5.3/migration.md @@ -145,6 +145,8 @@ Learn more by reading the new [color modes documentation]({{< docsref "/customiz - Form validation `border-color` and text `color` states now respond to dark mode, thanks to new Sass and CSS variables. +- New Our range documentation now provides an example which displays the current selected value for better usability, but with some extra JavaScript code. + ### Helpers and utilities - New `.border-{color}-subtle`.