Skip to content
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

Accessibility #586

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft

Accessibility #586

wants to merge 32 commits into from

Conversation

MarineM1
Copy link

@MarineM1 MarineM1 commented Jan 28, 2025

Purpose

To improve accessibility, certain parts of the code will be modified.
For this, I use a screen reader for testing and validation.

Proposal

  • Icons read with their translation or a short phrase
  • Tooltips read and displayed with their translation
  • Verify existing translations

To do : https://docs.numerique.gouv.fr/docs/65993bb6-3e94-4a32-b848-9a1e019ab849/

@@ -85,6 +94,7 @@ export const LeftPanelTargetFilters = () => {
<Icon
$variation={isActive ? '1000' : '700'}
iconName={query.icon}
aria-hidden="true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines 32 to 35
accessibility: {
'aria-hidden': true,
},
},
Copy link
Collaborator

@AntoLC AntoLC Jan 31, 2025

Choose a reason for hiding this comment

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

I don't think this part is necessary, better to change directly inside the component.

Comment on lines 53 to 74
aria-label={t('Back to home page')}
icon={
<Icon $variation="800" $theme="primary" iconName="house" />
<span aria-hidden="true">
<Icon $variation="800" $theme="primary" iconName="house" />
</span>
}
/>
{auth.authenticated && (
<Button
onClick={searchModal.open}
size="medium"
color="tertiary-text"
aria-label={t('Search')}
icon={
<Icon $variation="800" $theme="primary" iconName="search" />
<span aria-hidden="true">
<Icon
$variation="800"
$theme="primary"
iconName="search"
/>
</span>
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems good ! 👍

@@ -69,7 +69,7 @@ export const Header = () => {
$height="fit-content"
$margin={{ top: 'auto' }}
>
<Image priority src={IconDocs} alt={t('Docs Logo')} width={25} />
<Image priority src={IconDocs} alt="" width={25} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you remove the alt part ?

@@ -70,6 +69,7 @@ export const DocsGridActions = ({
iconName="more_horiz"
$theme="primary"
$variation="600"
aria-hidden="true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -54,6 +54,7 @@ export const LanguagePicker = () => {
$theme="primary"
$weight="bold"
$variation="800"
aria-hidden="true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -125,7 +125,7 @@ export const Footer = () => {
`}
>
<Text
$variation="600"
$variation="700"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this pull request should aim to modify the design.

@@ -1,3 +1,4 @@
//import { t } from 'i18next';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need it ?

-modifications after Sylvain's commentary
-modifications after Anto's commentaries
je ne commite que les modifications annoncées dans le commit précédent
- Read the Tooltip with the number of participants, not the icon
- In LeftPanel, when navigating with tab, we can see where we are
- In DocGrid, when navigating with tab, we can see where we are
- In Doc, don't read "doc title input" but "rename"
- In docSearch, don't read "search" icon and read "aucun document
  trouvé" with screen reader
The elements focused with "Tab" are visible and consistent with the
defined style.
The modal for document options has been modified to allow navigation
using "tab" and to be closed.
@MarineM1 MarineM1 requested review from AntoLC and sylvinus February 6, 2025 13:51
@PanchoutNathan PanchoutNathan removed their request for review March 24, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants