From b5e2f54bf8ea0d183f8bd5d273c63fe75f37caa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Thu, 15 May 2025 23:49:10 +0200 Subject: [PATCH] Enhance dropdown components for better accessibility (#2370) --- .changeset/quiet-plants-begin.md | 5 +++++ preview/pages/charts.html | 2 +- shared/includes/cards/charts/active-users.html | 2 +- shared/includes/cards/charts/new-clients.html | 2 +- shared/includes/cards/charts/revenue.html | 2 +- shared/includes/cards/charts/sales.html | 2 +- shared/includes/cards/icons-banner.html | 4 ++-- shared/includes/layout/navbar-logo.html | 6 +++--- shared/includes/layout/page-header.html | 2 +- shared/includes/parts/charts/activity.html | 2 +- shared/includes/parts/dropdown/days.html | 6 +++--- shared/includes/settings.html | 4 +++- 12 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 .changeset/quiet-plants-begin.md diff --git a/.changeset/quiet-plants-begin.md b/.changeset/quiet-plants-begin.md new file mode 100644 index 000000000..9b9a8e7c1 --- /dev/null +++ b/.changeset/quiet-plants-begin.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Enhance dropdown components for better accessibility diff --git a/preview/pages/charts.html b/preview/pages/charts.html index f30c3e28c..f2362399d 100644 --- a/preview/pages/charts.html +++ b/preview/pages/charts.html @@ -18,7 +18,7 @@ permalink: charts.html

Social referrals

- {% include "parts/dropdown/days.html" %} + {% include "parts/dropdown/days.html" id="social-referrals" label="Select time range for sales data" %}
{% include "ui/chart.html" chart-id="social-referrals" legend=true %} diff --git a/shared/includes/cards/charts/active-users.html b/shared/includes/cards/charts/active-users.html index f13dcad09..7c01d5f8b 100644 --- a/shared/includes/cards/charts/active-users.html +++ b/shared/includes/cards/charts/active-users.html @@ -3,7 +3,7 @@
Active subscriptions
- {% include "parts/dropdown/days.html" %} + {% include "parts/dropdown/days.html" id="active-users" label="Select time range for active users" %}
diff --git a/shared/includes/cards/charts/new-clients.html b/shared/includes/cards/charts/new-clients.html index 439831f3d..473187243 100644 --- a/shared/includes/cards/charts/new-clients.html +++ b/shared/includes/cards/charts/new-clients.html @@ -3,7 +3,7 @@
New clients
- {% include "parts/dropdown/days.html" %} + {% include "parts/dropdown/days.html" id="new-clients" label="Select time range for new clients" %}
diff --git a/shared/includes/cards/charts/revenue.html b/shared/includes/cards/charts/revenue.html index 9d9711b92..f346de845 100644 --- a/shared/includes/cards/charts/revenue.html +++ b/shared/includes/cards/charts/revenue.html @@ -3,7 +3,7 @@
Revenue
- {% include "parts/dropdown/days.html" %} + {% include "parts/dropdown/days.html" id="revenue" label="Select time range for revenue" %}
diff --git a/shared/includes/cards/charts/sales.html b/shared/includes/cards/charts/sales.html index 94b5bb522..eca86e049 100644 --- a/shared/includes/cards/charts/sales.html +++ b/shared/includes/cards/charts/sales.html @@ -3,7 +3,7 @@
Sales
- {% include "parts/dropdown/days.html" %} + {% include "parts/dropdown/days.html" id="sales" label="Select time range for sales data" %}
75%
diff --git a/shared/includes/cards/icons-banner.html b/shared/includes/cards/icons-banner.html index 072e3960b..61065794e 100644 --- a/shared/includes/cards/icons-banner.html +++ b/shared/includes/cards/icons-banner.html @@ -10,9 +10,9 @@

Tabler Icons

-
+
All icons come from the Tabler Icons set and are MIT-licensed. Visit - tabler.io/icons, + Tabler Icons Website, download any of the {{ icons-count }} icons in SVG, PNG or React and use them in your favourite design tools.
diff --git a/shared/includes/layout/navbar-logo.html b/shared/includes/layout/navbar-logo.html index 4768b9c7d..a62746f37 100644 --- a/shared/includes/layout/navbar-logo.html +++ b/shared/includes/layout/navbar-logo.html @@ -1,12 +1,12 @@ {%- assign prefix = include.prefix | default: 'navbar' -%} {%- assign breakpoint = include.breakpoint | default: 'lg' -%} -{%- capture class-attr %}class="{{ prefix }}-brand {{ prefix }}-brand-autodark{% if include.class %} {{ include.class }}{% endif %}"{%- endcapture -%} +{%- capture class-attr %} class="{{ prefix }}-brand {{ prefix }}-brand-autodark{% if include.class %} {{ include.class }}{% endif %}"{%- endcapture -%} {%- if include.header -%}
- + {%- else -%} - + {%- endif -%} {%- unless include.hide-logo -%} {%- if include.small-logo -%} diff --git a/shared/includes/layout/page-header.html b/shared/includes/layout/page-header.html index 3e538efa5..9abd762bd 100644 --- a/shared/includes/layout/page-header.html +++ b/shared/includes/layout/page-header.html @@ -9,7 +9,7 @@ {% if page-header-file %} {% include "layout/headers/{{ page-header-file }}.html" %} {% elsif page-header %} -