fix: accessibility improvements for contact, cookies, faq, forgot-password, reset-password pages
- Fix contrast issues (text-primary-300 -> text-primary-600, text-gray-500 -> text-gray-700) - Add form labels for search input and cookie toggles - Fix heading hierarchy (h1 -> h2 -> h3) - Add aria-label and sr-only for accessibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
788b2a17e7
commit
6f1b04364b
|
|
@ -96,8 +96,9 @@ export default function ContactPage() {
|
|||
<form onSubmit={handleSubmit} className="space-y-6">
|
||||
{/* Nom complet */}
|
||||
<div>
|
||||
<label htmlFor="fullName" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
<label htmlFor="fullName" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Nom complet <span className="text-red-600" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<input
|
||||
id="fullName"
|
||||
|
|
@ -113,8 +114,9 @@ export default function ContactPage() {
|
|||
|
||||
{/* Email */}
|
||||
<div>
|
||||
<label htmlFor="email" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
<label htmlFor="email" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Email <span className="text-red-600" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<input
|
||||
id="email"
|
||||
|
|
@ -130,8 +132,9 @@ export default function ContactPage() {
|
|||
|
||||
{/* Sujet */}
|
||||
<div>
|
||||
<label htmlFor="subject" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
<label htmlFor="subject" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Sujet <span className="text-red-600" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<select
|
||||
id="subject"
|
||||
|
|
@ -152,8 +155,9 @@ export default function ContactPage() {
|
|||
|
||||
{/* Message */}
|
||||
<div>
|
||||
<label htmlFor="message" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
<label htmlFor="message" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Message <span className="text-red-600" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<textarea
|
||||
id="message"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { useState } from "react";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card";
|
||||
import { Card, CardContent, CardHeader } from "@/components/ui/Card";
|
||||
import Button from "@/components/Button";
|
||||
|
||||
export default function CookiesPage() {
|
||||
|
|
@ -43,7 +43,7 @@ export default function CookiesPage() {
|
|||
return (
|
||||
<div className="py-12">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-primary-300 mb-8 text-center">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-primary-600 mb-8 text-center">
|
||||
Gestion des cookies
|
||||
</h1>
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ export default function CookiesPage() {
|
|||
{/* Introduction */}
|
||||
<Card className="mb-8">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">Qu'est-ce qu'un cookie ?</CardTitle>
|
||||
<h2 className="text-xl font-semibold text-gray-900">Qu'est-ce qu'un cookie ?</h2>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
<p className="text-gray-700">
|
||||
|
|
@ -71,14 +71,14 @@ export default function CookiesPage() {
|
|||
{/* Types de cookies */}
|
||||
<Card className="mb-8">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">Les cookies que nous utilisons</CardTitle>
|
||||
<h2 className="text-xl font-semibold text-gray-900">Les cookies que nous utilisons</h2>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-6">
|
||||
{/* Cookies essentiels */}
|
||||
<div className="border-l-4 border-primary-600 pl-4">
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<h3 className="font-semibold text-gray-900">Cookies essentiels</h3>
|
||||
<span className="text-sm text-gray-500 bg-gray-100 px-3 py-1 rounded">
|
||||
<span className="text-sm text-gray-700 bg-gray-100 px-3 py-1 rounded">
|
||||
Toujours actifs
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -106,7 +106,9 @@ export default function CookiesPage() {
|
|||
checked={preferences.analytics}
|
||||
onChange={() => handleToggle('analytics')}
|
||||
className="sr-only peer"
|
||||
aria-label="Activer les cookies analytiques"
|
||||
/>
|
||||
<span className="sr-only">Activer les cookies analytiques</span>
|
||||
<div className="w-11 h-6 bg-gray-300 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-600"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -135,7 +137,9 @@ export default function CookiesPage() {
|
|||
checked={preferences.marketing}
|
||||
onChange={() => handleToggle('marketing')}
|
||||
className="sr-only peer"
|
||||
aria-label="Activer les cookies marketing"
|
||||
/>
|
||||
<span className="sr-only">Activer les cookies marketing</span>
|
||||
<div className="w-11 h-6 bg-gray-300 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-600"></div>
|
||||
</label>
|
||||
</div>
|
||||
|
|
@ -191,7 +195,7 @@ export default function CookiesPage() {
|
|||
{/* Gestion des cookies */}
|
||||
<Card className="mb-8">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">Comment gérer vos cookies ?</CardTitle>
|
||||
<h2 className="text-xl font-semibold text-gray-900">Comment gérer vos cookies ?</h2>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
<p className="text-gray-700">
|
||||
|
|
@ -253,7 +257,7 @@ export default function CookiesPage() {
|
|||
{/* Informations complémentaires */}
|
||||
<Card className="mb-8">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">En savoir plus</CardTitle>
|
||||
<h2 className="text-xl font-semibold text-gray-900">En savoir plus</h2>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-3">
|
||||
<p className="text-gray-700">
|
||||
|
|
@ -285,7 +289,7 @@ export default function CookiesPage() {
|
|||
{/* Contact */}
|
||||
<Card className="mb-8">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-xl">Contact</CardTitle>
|
||||
<h2 className="text-xl font-semibold text-gray-900">Contact</h2>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-gray-700">
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export default function FAQContent() {
|
|||
<section className="bg-gradient-to-r from-white to-[#faf9f5] py-12 border-b-2 border-[#e5e4dc]">
|
||||
<div className="container mx-auto px-4">
|
||||
<div className="max-w-4xl mx-auto text-center">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-primary-300 mb-4">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-primary-600 mb-4">
|
||||
Questions fréquentes
|
||||
</h1>
|
||||
<p className="text-lg text-[#8a8a7a]">
|
||||
|
|
@ -116,7 +116,9 @@ export default function FAQContent() {
|
|||
<div className="container mx-auto px-4">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<div className="relative">
|
||||
<label htmlFor="faq-search" className="sr-only">Rechercher une question</label>
|
||||
<input
|
||||
id="faq-search"
|
||||
type="text"
|
||||
placeholder="Rechercher une question..."
|
||||
value={searchQuery}
|
||||
|
|
@ -128,6 +130,7 @@ export default function FAQContent() {
|
|||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
|
|
@ -226,9 +229,9 @@ export default function FAQContent() {
|
|||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<a
|
||||
href="mailto:support@thetiptop.com"
|
||||
className="inline-flex items-center justify-center gap-2 bg-white text-[#d4a574] hover:bg-[#f5f5f0] font-bold px-8 py-3 rounded-lg transition-all shadow-lg hover:scale-105 duration-300"
|
||||
className="inline-flex items-center justify-center gap-2 bg-white text-gray-900 hover:bg-[#f5f5f0] font-bold px-8 py-3 rounded-lg transition-all shadow-lg hover:scale-105 duration-300"
|
||||
>
|
||||
✉️ support@thetiptop.com
|
||||
<span aria-hidden="true">✉️</span> support@thetiptop.com
|
||||
</a>
|
||||
<Link
|
||||
href="/contact"
|
||||
|
|
|
|||
|
|
@ -117,8 +117,9 @@ export default function ForgotPasswordPage() {
|
|||
|
||||
{/* Email */}
|
||||
<div>
|
||||
<label htmlFor="email" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
Email <span className="text-red-500">*</span>
|
||||
<label htmlFor="email" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Email <span className="text-red-500" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<input
|
||||
id="email"
|
||||
|
|
|
|||
|
|
@ -132,8 +132,9 @@ function ResetPasswordForm() {
|
|||
|
||||
{/* New Password */}
|
||||
<div>
|
||||
<label htmlFor="password" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
Nouveau mot de passe <span className="text-red-500">*</span>
|
||||
<label htmlFor="password" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Nouveau mot de passe <span className="text-red-500" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<div className="relative">
|
||||
<input
|
||||
|
|
@ -151,13 +152,14 @@ function ResetPasswordForm() {
|
|||
type="button"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700"
|
||||
aria-label={showPassword ? "Masquer le mot de passe" : "Afficher le mot de passe"}
|
||||
>
|
||||
{showPassword ? (
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
||||
</svg>
|
||||
|
|
@ -168,8 +170,9 @@ function ResetPasswordForm() {
|
|||
|
||||
{/* Confirm Password */}
|
||||
<div>
|
||||
<label htmlFor="confirmPassword" className="block text-sm font-semibold text-gray-700 mb-2">
|
||||
Confirmer le mot de passe <span className="text-red-500">*</span>
|
||||
<label htmlFor="confirmPassword" className="block text-sm font-semibold text-gray-900 mb-2">
|
||||
Confirmer le mot de passe <span className="text-red-500" aria-hidden="true">*</span>
|
||||
<span className="sr-only">(obligatoire)</span>
|
||||
</label>
|
||||
<input
|
||||
id="confirmPassword"
|
||||
|
|
@ -186,7 +189,7 @@ function ResetPasswordForm() {
|
|||
|
||||
{/* Password Requirements */}
|
||||
<div className="bg-gray-50 p-4 rounded-lg">
|
||||
<p className="text-sm font-semibold text-gray-700 mb-2">Le mot de passe doit contenir :</p>
|
||||
<p className="text-sm font-semibold text-gray-900 mb-2">Le mot de passe doit contenir :</p>
|
||||
<ul className="text-sm text-gray-600 space-y-1">
|
||||
<li className={`flex items-center gap-2 ${password.length >= 8 ? 'text-green-600' : ''}`}>
|
||||
{password.length >= 8 ? (
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user