mirror of
https://github.com/deepseek-ai/DeepSeek-V3.git
synced 2025-04-20 10:38:57 -04:00
Add accessible CAPTCHA solution using hCaptcha to improve accessibility for visually impaired users. * **Add dependencies**: Add `hcaptcha` and `flask` to `requirements.txt`. * **Implement hCaptcha in Flask app**: Create `app.py` to set up Flask application, configure hCaptcha, and create routes for sign-up and login with hCaptcha integration. * **Create sign-up form**: Add `templates/signup.html` with HTML form for user sign-up, integrating hCaptcha widget and adding ARIA labels and roles for screen reader compatibility. * **Create login form**: Add `templates/login.html` with HTML form for user login, integrating hCaptcha widget and adding ARIA labels and roles for screen reader compatibility. * **Add CSS styles**: Add `static/css/styles.css` to style form elements and hCaptcha widget, ensuring high contrast and readability for visually impaired users. * **Write unit tests**: Add `tests/test_accessibility.py` to test accessibility features using NVDA and verify hCaptcha integration and screen reader compatibility. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/twlhitesh/DeepSeek-V3?shareId=XXXX-XXXX-XXXX-XXXX).
30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Login</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Login</h1>
|
|
<form action="{{ url_for('login') }}" method="POST">
|
|
<div class="form-group">
|
|
<label for="username" aria-label="Username">Username</label>
|
|
<input type="text" id="username" name="username" required aria-required="true">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password" aria-label="Password">Password</label>
|
|
<input type="password" id="password" name="password" required aria-required="true">
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="h-captcha" data-sitekey="{{ hcaptcha_site_key }}" role="presentation" aria-hidden="true"></div>
|
|
</div>
|
|
<button type="submit" aria-label="Login">Login</button>
|
|
</form>
|
|
</div>
|
|
<script src="https://hcaptcha.com/1/api.js" async defer></script>
|
|
</body>
|
|
</html>
|