From 64cb54afcdd4b6d3059774fb434ae4e432dae9a4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 18:15:22 +0000 Subject: [PATCH 1/6] Initial plan From f14a7414a72a39026b8b87077c92415e1efce792 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 18:23:05 +0000 Subject: [PATCH 2/6] feat: improve action component accessibility and i18n fallbacks Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --- docs/components/button.md | 19 +++++- docs/components/icon-button.md | 79 ++++++++++++++++++++++ docs/components/index.md | 6 +- src/components/button/BqButton.ts | 13 +++- src/components/empty-state/BqEmptyState.ts | 11 +-- src/components/icon-button/BqIconButton.ts | 15 +++- src/components/spinner/BqSpinner.ts | 10 ++- stories/icon-button.stories.ts | 70 +++++++++++++++++++ tests/a11y-and-i18n-fixes.test.ts | 34 ++++++++++ tests/button.test.ts | 8 +++ tests/icon-button.test.ts | 39 +++++++++++ 11 files changed, 289 insertions(+), 15 deletions(-) create mode 100644 docs/components/icon-button.md create mode 100644 stories/icon-button.stories.ts create mode 100644 tests/icon-button.test.ts diff --git a/docs/components/button.md b/docs/components/button.md index 594c85c..68604ba 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -1,6 +1,6 @@ # Button -The `bq-button` component is a versatile, accessible button element supporting multiple variants, sizes, loading states, and icon slots. +The `bq-button` component is a versatile, accessible button element supporting multiple variants, sizes, loading states, accessible naming overrides, and icon slots. ## Basic Usage @@ -27,6 +27,8 @@ The `bq-button` component is a versatile, accessible button element supporting m Loading… ``` +When `loading` is enabled, the inner control exposes `aria-busy="true"` and adds a localized screen-reader-only loading announcement. + ## Disabled State ```html @@ -55,6 +57,14 @@ The `bq-button` component is a versatile, accessible button element supporting m ``` +If you need an icon-only action, prefer [`bq-icon-button`](/components/icon-button). If you intentionally render `bq-button` without visible text, provide a `label` so assistive technologies still announce a meaningful name. + +```html + + + +``` + ## Properties | Property | Type | Default | Description | @@ -66,6 +76,7 @@ The `bq-button` component is a versatile, accessible button element supporting m | `type` | `button \| submit \| reset` | `button` | Form submission type | | `href` | `string` | — | Renders as `` when set | | `target` | `string` | — | Link target (used with `href`) | +| `label` | `string` | — | Optional accessible label override, especially useful for icon-only usage | ## Events @@ -86,3 +97,9 @@ The `bq-button` component is a versatile, accessible button element supporting m | Part | Description | |------|-------------| | `button` | The inner `