From dc1b9194ca72ef8b3d76358ba724e24cb6a5f786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Fri, 13 Feb 2026 17:55:17 +0100 Subject: [PATCH 01/16] refactor: make radio button its own component --- app/components/Filter/Panel.vue | 15 ++++--- app/components/Radio/Base.vue | 65 ++++++++++++++++++++++++++++++ app/components/Tag/RadioButton.vue | 45 --------------------- test/nuxt/a11y.spec.ts | 10 ++--- 4 files changed, 79 insertions(+), 56 deletions(-) create mode 100644 app/components/Radio/Base.vue delete mode 100644 app/components/Tag/RadioButton.vue diff --git a/app/components/Filter/Panel.vue b/app/components/Filter/Panel.vue index 788403ad3..88fb97b24 100644 --- a/app/components/Filter/Panel.vue +++ b/app/components/Filter/Panel.vue @@ -261,16 +261,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value) role="radiogroup" :aria-label="$t('filters.weekly_downloads')" > - {{ getDownloadRangeLabelKey(range.value) }} - + @@ -284,16 +285,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value) role="radiogroup" :aria-label="$t('filters.updated_within')" > - {{ getUpdatedWithinLabelKey(option.value) }} - + @@ -306,16 +308,17 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
- {{ getSecurityLabelKey(security) }} - +
diff --git a/app/components/Radio/Base.vue b/app/components/Radio/Base.vue new file mode 100644 index 000000000..124a9d374 --- /dev/null +++ b/app/components/Radio/Base.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/Tag/RadioButton.vue b/app/components/Tag/RadioButton.vue deleted file mode 100644 index aa3778cbd..000000000 --- a/app/components/Tag/RadioButton.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/test/nuxt/a11y.spec.ts b/test/nuxt/a11y.spec.ts index 23ffb915a..e3077dd76 100644 --- a/test/nuxt/a11y.spec.ts +++ b/test/nuxt/a11y.spec.ts @@ -183,7 +183,7 @@ import { SettingsBgThemePicker, SettingsToggle, TagStatic, - TagRadioButton, + RadioBase, TerminalExecute, TerminalInstall, TooltipAnnounce, @@ -430,9 +430,9 @@ describe('component accessibility audits', () => { }) }) - describe('TagRadioButton', () => { + describe('RadioBase', () => { it('should have no accessibility violations', async () => { - const component = await mountSuspended(TagRadioButton, { + const component = await mountSuspended(RadioBase, { props: { value: 'option1', modelValue: 'option2' }, slots: { default: 'Tag content' }, }) @@ -441,7 +441,7 @@ describe('component accessibility audits', () => { }) it('should have no accessibility violations when checked', async () => { - const component = await mountSuspended(TagRadioButton, { + const component = await mountSuspended(RadioBase, { props: { value: 'option1', modelValue: 'option1' }, slots: { default: 'Tag content' }, }) @@ -450,7 +450,7 @@ describe('component accessibility audits', () => { }) it('should have no accessibility violations when disabled', async () => { - const component = await mountSuspended(TagRadioButton, { + const component = await mountSuspended(RadioBase, { props: { value: 'option1', modelValue: 'option2', disabled: true }, slots: { default: 'Tag content' }, }) From c6f6e8ed7dc9dd8c1891a45ede036c349b10a549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Fri, 13 Feb 2026 18:02:39 +0100 Subject: [PATCH 02/16] style: show radio button on radio button --- app/components/Radio/Base.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/Radio/Base.vue b/app/components/Radio/Base.vue index 124a9d374..a32201e7d 100644 --- a/app/components/Radio/Base.vue +++ b/app/components/Radio/Base.vue @@ -52,7 +52,7 @@ const onChange = () => { class="peer sr-only" />