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

fix: do not add aria-describedby to hidden inputs #12496

Merged

Conversation

ahukkanen
Copy link
Contributor

Description

The abide component is currently potentially adding the aria-describedby attribute also on hidden inputs where it is not valid HTML.

The intention of the HTML validator is not to allow this through this rule:
https://github.com/validator/validator/blob/b896708d94d12df67075c6cfd43afc0f8a140ef0/src/nu/validator/checker/schematronequiv/Assertions.java#L2042-L2045

However, currently it is buggy and the following HTML passes the HTML validator:

<!DOCTYPE html>
<html lang="">
<head>
  <title>Test</title>
</head>
<body>
  <form>
    <input type="hidden" name="test" value="abc" aria-describedby="test-abide-error">
    <span id="test-abide-error">Test</span>
  </form>
</body>
</html>

But this fix will fix it also in the future versions of the HTML validator when that bug is fixed.

Types of changes

  • Documentation
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (anything that would change an existing functionality)
  • Maintenance (refactor, code cleaning, development tools...)

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • The pull request title and template are correctly filled.
  • The pull request targets the right branch (develop or develop-v...).
  • My commits are correctly titled and contain all relevant information.
  • I have updated the documentation accordingly to my changes (if relevant).
  • I have added tests to cover my changes (if relevant).

@sonarcloud
Copy link

sonarcloud bot commented Nov 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.8% 2.8% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants