Skip to content

✨(frontend) improve accessibility of cdoc content with correct aria tags #1271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Aug 7, 2025

Purpose

Ensure that document content titles and download buttons are accessible to screen readers by using appropriate ARIA labels and adding missing translations.

Proposal

  • Add aria-label attributes to the document content title and download button
  • Insert missing i18n translation strings for accessibility

@Ovgodd Ovgodd requested a review from AntoLC August 7, 2025 09:04
@Ovgodd Ovgodd self-assigned this Aug 7, 2025
@Ovgodd Ovgodd force-pushed the fix/doc-content-head-access branch 2 times, most recently from 25d7248 to c1cd0d1 Compare August 7, 2025 09:07
@Ovgodd Ovgodd marked this pull request as ready for review August 7, 2025 09:07
@Ovgodd Ovgodd force-pushed the fix/doc-content-head-access branch from c1cd0d1 to 0286a01 Compare August 8, 2025 07:22
@Ovgodd Ovgodd force-pushed the fix/doc-content-head-access branch 3 times, most recently from 36b367d to 1303bdb Compare August 8, 2025 12:49
added appropriate aria attributes and semantic tags to enhance accessibility

Signed-off-by: Cyril <[email protected]>
@Ovgodd Ovgodd force-pushed the fix/doc-content-head-access branch from 1303bdb to 559b869 Compare August 8, 2025 12:56
@Ovgodd Ovgodd requested a review from AntoLC August 8, 2025 13:41
Comment on lines +442 to +444
await expect(
page.getByTestId('doc-open-modal-download-button'),
).toBeVisible();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, the click would not be possible if that was not already visible.

Suggested change
await expect(
page.getByTestId('doc-open-modal-download-button'),
).toBeVisible();

Comment on lines +48 to +51
await page.waitForURL('**/docs/**', {
timeout: 10000,
waitUntil: 'domcontentloaded',
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will increase test execution, if you need to increase time, better it increases the timeout, here you could do:
https://github.com/suitenumerique/docs/pull/1271/files#diff-1edbd2d2d1f16be04e52adef35ce6a7468b17d323b87999f0b636b99072404b4R54

    await expect(input).toHaveText('', { timeout: 10000 });µ

Comment on lines +75 to +78
await page.waitForURL('**/docs/**', {
timeout: 10000,
waitUntil: 'domcontentloaded',
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

await expect(input).toBeVisible();
await expect(input).toHaveText('');
const input = page.locator('.--docs--doc-title-input[role="textbox"]');
await expect(input).toBeVisible({ timeout: 20000 });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same it is not optimal, if it is a new doc the input should be empty, so assert with a bigger timeout on await expect(input).toHaveText(''); should make the job.
You could have the input visible, but still from a parent as it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants