Skip to content

Commit

Permalink
fix(accessibility): update title accesibility for structure pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Nov 22, 2023
1 parent b6749ba commit 2120bc2
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/blocs/chiffres-cles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function ChiffresCles({ exercice, netAccountingResult, population
if (all.length === 0) return null;
return (
<Container fluid className="fr-mb-5w">
<BlocTitle as="h3" look="h6">Chiffres clés</BlocTitle>
<BlocTitle as="h2" look="h6">Chiffres clés</BlocTitle>
<BlocContent>
<Row gutters>
{all.map((element) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/emails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function EmailsComponent() {

return (
<Bloc isLoading={isLoading} error={error} data={data}>
<BlocTitle as="h3" look="h4">Boites emails génériques</BlocTitle>
<BlocTitle as="h2" look="h4">Boites emails génériques</BlocTitle>
<BlocActionButton onClick={() => onOpenModalHandler()}>Ajouter un email générique</BlocActionButton>
<BlocContent>{renderCards()}</BlocContent>
<BlocModal>
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/identifiers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default function IdentifiersComponent() {

return (
<Bloc isLoading={isLoading} error={error} data={data}>
<BlocTitle as="h3" look="h4">
<BlocTitle as="h2" look="h4">
Identifiants
</BlocTitle>
<BlocActionButton onClick={() => onOpenModalHandler()}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/localisations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function LocalisationsComponent() {

return (
<Bloc isLoading={isLoading} error={error} data={data}>
<BlocTitle as="h3" look="h6">Localisations</BlocTitle>
<BlocTitle as="h2" look="h6">Localisations</BlocTitle>
<BlocActionButton onClick={() => handleModalToggle()}>
Ajouter une adresse
</BlocActionButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function RelationsByTag({ blocName, tag, resourceType, relatedObj

return (
<Bloc isLoading={isLoading} error={error} data={data} isRelation>
<BlocTitle as="h3" look="h6">{blocName || tag}</BlocTitle>
<BlocTitle as="h2" look="h6">{blocName || tag}</BlocTitle>
<BlocActionButton onClick={() => onOpenModalHandler()}>Ajouter un élément</BlocActionButton>
{(!noFilters) && <BlocFilter statusFilter={statusFilter} setStatusFilter={setStatusFilter} counts={counts} />}
{hasExport({ tag, inverse }) && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/relations/components/relations-geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function RelationGeo({ blocName }) {

return (
<Bloc isLoading={isLoading} error={error} data={data} isRelation>
<BlocTitle as="h3" look="h6">{blocName}</BlocTitle>
<BlocTitle as="h2" look="h6">{blocName}</BlocTitle>
<BlocContent>
{renderCards()}
</BlocContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default function RelationsGouvernance({ blocName, tag, resourceType, rela

return (
<Bloc isLoading={isLoading} error={error} data={data} isRelation>
<BlocTitle as="h3" look="h6">{blocName || tag}</BlocTitle>
<BlocTitle as="h2" look="h6">{blocName || tag}</BlocTitle>
<BlocActionButton onClick={() => onOpenModalHandler()}>Ajouter un élément</BlocActionButton>
{(!noFilters) && <BlocFilter statusFilter={statusFilter} setStatusFilter={setStatusFilter} counts={counts} />}
{hasExport({ tag, inverse }) && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/social-medias/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function SocialMediasComponent() {

return (
<Bloc isLoading={isLoading} error={error} data={data}>
<BlocTitle as="h4" look="h6">Réseaux sociaux</BlocTitle>
<BlocTitle as="h3" look="h6">Réseaux sociaux</BlocTitle>
<BlocActionButton onClick={() => onOpenModalHandler()} isSmall>Ajouter un réseau social</BlocActionButton>
<BlocContent>{renderCards()}</BlocContent>
<BlocModal>
Expand Down
2 changes: 1 addition & 1 deletion src/components/blocs/weblinks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function Weblinks({ types, title }) {
error={error}
data={{ totalCount: getElementsCount() }}
>
<BlocTitle as="h4" look="h6">
<BlocTitle as="h3" look="h6">
{title}
</BlocTitle>
<BlocActionButton onClick={onOpenModalHandler} isSmall>
Expand Down
4 changes: 2 additions & 2 deletions src/components/card/weblink-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export default function WeblinkCard({
)}
<Col>
{title ? (
<h4 className="fr-card__title text-center">
<h3 className="fr-card__title text-center">
{title}
<Link href={downloadUrl} target="_blank" />
</h4>
</h3>
) : null}
<div className="fr-card__desc">{descriptionElement}</div>
{editMode && canEdit && (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/rechercher.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function SearchPage() {
</BreadcrumbItem>
</Breadcrumb>
<Row>
<Title as="h2" look="h5">
<Title as="h1" look="h5">
Résultats pour la recherche
{query?.length > 0 && (
` "${query}"`
Expand Down
4 changes: 2 additions & 2 deletions src/pages/structures/[id]/chiffres-cles/budget.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ Il constitue une marge de sécurité financière destinée à financer une parti
return (
<>
{!data?.data?.length && (
<Title as="h3">
<Title as="h2">
Pas de données financières connues pour cette structure
</Title>
)}
{!!data?.data?.length && (
<>
<Title as="h3">
<Title as="h2">
<Icon name="ri-scales-3-fill" className="fr-pl-1w" />
{`Données financières - Situation en ${financialAccountYear}${financialAccount?.source === 'Budget' ? ' (Budget)' : ''}`}
</Title>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/structures/[id]/chiffres-cles/etudiants.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ export default function StructureEtudiantsPage() {
if (error) return <>Erreur...</>;
return (
<>
<Title as="h3">
<Title as="h2">
<Icon name="ri-user-fill" className="fr-pl-1w" />
Les étudiants inscrits
</Title>
<Bloc isLoading={isLoading} error={error} data={data} noBadge>
<BlocTitle as="h4">
<BlocTitle as="h3">
{`Situation en ${year} - Source : SISE`}
</BlocTitle>
<BlocContent>
Expand All @@ -474,7 +474,7 @@ export default function StructureEtudiantsPage() {
</BlocContent>
</Bloc>
<Bloc isLoading={isLoading} error={error} data={data} noBadge>
<BlocTitle as="h4">
<BlocTitle as="h3">
Évolution historique
</BlocTitle>
<BlocContent>
Expand Down Expand Up @@ -531,7 +531,7 @@ export default function StructureEtudiantsPage() {
</BlocContent>
</Bloc>
<Bloc isLoading={isLoading} error={error} data={data} noBadge>
<BlocTitle as="h4">
<BlocTitle as="h3">
Ressource(s) en ligne : #dataESR
</BlocTitle>
<BlocContent>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/structures/[id]/chiffres-cles/immobilier.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function StructureImmobilierPage() {
return (
<>
{!allData?.length && (
<Title as="h3">
<Title as="h2">
Pas de données immobilières connues pour cette structure
</Title>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export default function StructureInsertionProfessionnellePage() {
if (error) return <>Erreur...</>;
return (
<>
<Title as="h3">
<Title as="h2">
<Icon name="ri-building-fill" className="fr-pl-1w" />
Insertion professionnelle
</Title>
<Bloc isLoading={false} error={false} data={{ totalCount: 42 }} noBadge>
<BlocTitle as="h4">
<BlocTitle as="h3">
Ressource(s) en ligne : #dataESR
</BlocTitle>
<BlocContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function StructureOffreDeFormationPage() {

return (
<>
<Title as="h3">
<Title as="h2">
<Icon name="ri-file-list-fill" className="fr-pl-1w" />
Offre de formation
</Title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function StructureRHPage() {
if (error) return <>Erreur...</>;
return (
<>
<Title as="h3">
<Title as="h2">
<Icon name="ri-community-fill" className="fr-pl-1w" />
{`Ressources humaines BIATSS pour l'année ${year}`}
</Title>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/structures/[id]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function StructureByIdPage() {
</ButtonGroup>
</Row>
<Row>
<Title as="h2">
<Title as="h1">
{getName(data?.currentName)}
<Title className="fr-pr-1v" as="h6">{getOtherNames(data?.currentName)}</Title>
<BadgeGroup className="fr-pt-1w">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/structures/[id]/presentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function StructurePresentationPage() {
<>
<Row>
<Col n="12">
<Title as="h3" look="h4">En un coup d'oeil</Title>
<Title as="h2" look="h4">En un coup d'oeil</Title>
</Col>
</Row>
<Names visible={editMode} />
Expand Down Expand Up @@ -77,7 +77,7 @@ export default function StructurePresentationPage() {
year={year}
/>
<StructureCurrentGovernance />
<Title as="h3" look="h4">Présence sur le web</Title>
<Title as="h2" look="h4">Présence sur le web</Title>
<Row gutters>
<Col n="12 md-6">
<Weblinks types={INTERNAL_PAGES_TYPES} title="Site internet" />
Expand Down

0 comments on commit 2120bc2

Please sign in to comment.