diff --git a/CHANGELOG.md b/CHANGELOG.md
index afd6591525..18749ca183 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,11 @@ and this project adheres to
## [Unreleased]
+### Fixed
+
+- ♿(frontend) improve accessibility:
+ - ♿(frontend) improve share modal button accessibility #1626
+
## [3.10.0] - 2025-11-18
### Added
diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-member-create.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-member-create.spec.ts
index 11fdb734f7..36b5813477 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/doc-member-create.spec.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-member-create.spec.ts
@@ -84,7 +84,7 @@ test.describe('Document create member', () => {
// Validate
await page.getByRole('menuitem', { name: 'Administrator' }).click();
- await page.getByRole('button', { name: 'Invite' }).click();
+ await page.getByRole('button', { name: /^Invite / }).click();
// Check invitation added
await expect(
@@ -135,7 +135,7 @@ test.describe('Document create member', () => {
(response) =>
response.url().includes('/invitations/') && response.status() === 201,
);
- await page.getByRole('button', { name: 'Invite' }).click();
+ await page.getByRole('button', { name: /^Invite / }).click();
// Check invitation sent
@@ -154,7 +154,7 @@ test.describe('Document create member', () => {
response.url().includes('/invitations/') && response.status() === 400,
);
- await page.getByRole('button', { name: 'Invite' }).click();
+ await page.getByRole('button', { name: /^Invite / }).click();
await expect(
page.getByText(`"${email}" is already invited to the document.`),
).toBeVisible();
@@ -191,7 +191,7 @@ test.describe('Document create member', () => {
response.url().includes('/invitations/') && response.status() === 201,
);
- await page.getByRole('button', { name: 'Invite' }).click();
+ await page.getByRole('button', { name: /^Invite / }).click();
// Check invitation sent
const responseCreateInvitation = await responsePromiseCreateInvitation;
diff --git a/src/frontend/apps/e2e/__tests__/app-impress/utils-share.ts b/src/frontend/apps/e2e/__tests__/app-impress/utils-share.ts
index 23dfc0aaf6..dcc798da6a 100644
--- a/src/frontend/apps/e2e/__tests__/app-impress/utils-share.ts
+++ b/src/frontend/apps/e2e/__tests__/app-impress/utils-share.ts
@@ -40,7 +40,7 @@ export const addNewMember = async (
// Choose a role
await page.getByLabel('doc-role-dropdown').click();
await page.getByRole('menuitem', { name: role }).click();
- await page.getByRole('button', { name: 'Invite' }).click();
+ await page.getByRole('button', { name: /^Invite / }).click();
return users[index].email;
};
diff --git a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareAddMemberList.tsx b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareAddMemberList.tsx
index b797eb96ca..3008f960c7 100644
--- a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareAddMemberList.tsx
+++ b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareAddMemberList.tsx
@@ -108,6 +108,12 @@ export const DocShareAddMemberList = ({
afterInvite?.();
setIsLoading(false);
};
+ const inviteLabel =
+ selectedUsers.length === 1
+ ? t('Invite {{name}}', {
+ name: selectedUsers[0].full_name || selectedUsers[0].email,
+ })
+ : t('Invite {{count}} members', { count: selectedUsers.length });
return (
-