-
Notifications
You must be signed in to change notification settings - Fork 378
✨(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
base: main
Are you sure you want to change the base?
Conversation
25d7248
to
c1cd0d1
Compare
c1cd0d1
to
0286a01
Compare
src/frontend/apps/impress/src/features/docs/doc-header/components/DocTitle.tsx
Outdated
Show resolved
Hide resolved
36b367d
to
1303bdb
Compare
added appropriate aria attributes and semantic tags to enhance accessibility Signed-off-by: Cyril <[email protected]>
1303bdb
to
559b869
Compare
await expect( | ||
page.getByTestId('doc-open-modal-download-button'), | ||
).toBeVisible(); |
There was a problem hiding this comment.
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.
await expect( | |
page.getByTestId('doc-open-modal-download-button'), | |
).toBeVisible(); |
await page.waitForURL('**/docs/**', { | ||
timeout: 10000, | ||
waitUntil: 'domcontentloaded', | ||
}); |
There was a problem hiding this comment.
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 });µ
await page.waitForURL('**/docs/**', { | ||
timeout: 10000, | ||
waitUntil: 'domcontentloaded', | ||
}); |
There was a problem hiding this comment.
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 }); |
There was a problem hiding this comment.
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.
Purpose
Ensure that document content titles and download buttons are accessible to screen readers by using appropriate ARIA labels and adding missing translations.
Proposal