From 1bf9b836937f50e0cc7f100524100c4c50555be2 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 1 Mar 2026 22:27:17 +0100 Subject: [PATCH] Fix aria label --- tests/e2e/web/pages/signUpPage.ts | 10 +++++----- web/components/widgets/radio-toggle-group.tsx | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/e2e/web/pages/signUpPage.ts b/tests/e2e/web/pages/signUpPage.ts index cb3a9d8f..a4ef792e 100644 --- a/tests/e2e/web/pages/signUpPage.ts +++ b/tests/e2e/web/pages/signUpPage.ts @@ -112,11 +112,11 @@ export class SignUpPage { this.minAgeOption = page.getByTestId('pref-age-min') this.maxAgeOption = page.getByTestId('pref-age-max') this.currentNumberOfKidsField = page.getByTestId('current-number-of-kids') - this.stronglyDisagreeOnWantingKids = page.locator('[id="headlessui-radiogroup-option-:r49:"]') - this.disagreeOnWantingKids = page.locator('[id="headlessui-radiogroup-option-:r4b:"]') - this.neutralOnWantingKids = page.locator('[id="headlessui-radiogroup-option-:r4d:"]') - this.agreeOnWantingKids = page.locator('[id="headlessui-radiogroup-option-:r4f:"]') - this.stronglyAgreeOnWantingKids = page.locator('[id="headlessui-radiogroup-option-:r4h:"]') + this.stronglyDisagreeOnWantingKids = page.getByRole('radio', {name: 'Strongly disagree'}) + this.disagreeOnWantingKids = page.getByRole('radio', {name: 'Disagree'}) + this.neutralOnWantingKids = page.getByRole('radio', {name: 'Neutral'}) + this.agreeOnWantingKids = page.getByRole('radio', {name: 'Agree'}) + this.stronglyAgreeOnWantingKids = page.getByRole('radio', {name: 'Strongly agree'}) this.addInterestsField = page.getByRole('textbox', {name: 'Search or add'}).first() this.addInterestsButton = page.getByRole('button', {name: 'Add'}).first() this.addCausesField = page.getByRole('textbox', {name: 'Search or add'}).nth(1) diff --git a/web/components/widgets/radio-toggle-group.tsx b/web/components/widgets/radio-toggle-group.tsx index f1d7852d..308534e3 100644 --- a/web/components/widgets/radio-toggle-group.tsx +++ b/web/components/widgets/radio-toggle-group.tsx @@ -35,6 +35,7 @@ export function RadioToggleGroup(props: { setChoice(-1) } }} + aria-label={choiceKey} key={choiceKey} value={choice} className={({disabled}) =>