Skip to content

Fix the accessibility issue in the login page: Labels or instructions not provided when content requires user input #12047

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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

oussama-taoufiq
Copy link
Contributor

Page / Screen Title
Defect Dojo login
Page URL / Screen ID
https://demo.defectdojo.org
Error Title
Labels or instructions not provided when content requires user input
Error Severity
Serious
Status
Fail
Accessibility Issue
[Description of issue] The required fields such as "Username" and "Password" are mandatory in order to login. The only visual indicator that a user assume that its required, are the "*".

[Impact on users] User might not know that the fields are required.

[Pattern] On the login page, the 2 label for the input field.

[Steps to reproduce]
Please see screenshot

[Sample of code] Username*

Remediation
[Recommendation] Please have the word (required) within the label of the input and put the "*" and required in red.

[Example of Compliant Code]

...
First name (required)

[Additional Resources] https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/G184 https://wet-boew.github.io/v4.0-ci/demos/formvalid/formvalid-en.html

Impacted Users
Users of Assistive Technologies (AT)
Keyboard-only users

Screenshot

image

dependabot bot and others added 6 commits March 17, 2025 10:30
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.26.0 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.26.0 to 7.26.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link

dryrunsecurity bot commented Mar 18, 2025

DryRun Security Summary

CSS and HTML template updates for form fields and login page were made, with identified security considerations around multiple authentication methods and potential risks in OAuth login URL parameter handling.

Expand for full summary
  1. Summary: CSS and HTML template modifications for form fields and login page, adjusting layout, styling, and authentication method display with minor grid and class changes.

  2. Security Findings:

  • Multiple authentication methods increase potential attack surface
  • Passes request.GET.next parameter in OAuth login URLs (potential security risk if not properly validated)
  • External authentication methods depend on correct provider configuration
  • Multiple OAuth/SSO providers could introduce additional security complexity

Code Analysis

We ran 7 analyzers against 3 files and 1 analyzer had findings. 6 analyzers had no findings.

Analyzer Findings
Configured Codepaths Analyzer 3 findings

Overall Riskiness

🔴 Risk threshold exceeded.

We've notified @mtesauro, @grendel513.

View PR in the DryRun Dashboard.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@blakeaowens
Copy link
Contributor

Hello @oussama-taoufiq, would you please migrate this PR to use the aria-required attribute instead of the (required) text? Documentation on aria-required can be found here.

@mtesauro
Copy link
Contributor

Hello @oussama-taoufiq, would you please migrate this PR to use the aria-required attribute instead of the (required) text? Documentation on aria-required can be found here.

+1,000 on using aria-required

@oussama-taoufiq
Copy link
Contributor Author

Hello @blakeaowens, @mtesauro, could you tell me where the username and password input are injected into the login page to be able to add the area-required attribute?

@Maffooch
Copy link
Contributor

Maffooch commented Apr 7, 2025

The login for is rendered by the form_fields.html snippet. This change would be in the same place that you added the (required) label

@Maffooch Maffooch added this to the 2.46.0 milestone Apr 7, 2025
@oussama-taoufiq
Copy link
Contributor Author

@Maffooch, Regarding the documentation you mentioned above, the aria-required attribute must be applied to the text box element and not to the label. In addition, I get an error when I try to put it on the label in the form_fields.html snippet.

image

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