Skip to content

fix: annotate generated form fields#1640

Merged
JiHong88 merged 1 commit into
JiHong88:masterfrom
PascalThuet:fix/generated-form-field-attributes
May 2, 2026
Merged

fix: annotate generated form fields#1640
JiHong88 merged 1 commit into
JiHong88:masterfrom
PascalThuet:fix/generated-form-field-attributes

Conversation

@PascalThuet

Copy link
Copy Markdown
Contributor

Summary

  • add stable ids and autocomplete=off to SunEditor-generated internal input/textarea fields
  • mark decorative line-number textareas as aria-hidden and remove them from tab order
  • add a unit test covering the generated field attributes

Why

Chrome surfaces form warnings when generated editor controls have neither id nor name, or recognized fields miss autocomplete. The added ids avoid changing form submission payloads while silencing those diagnostics.

Test

  • npm test -- --runTestsByPath test/unit/core/section/constructor.spec.js
  • npm run lint:type
  • npx eslint src/core/section/constructor.js

@PascalThuet

Copy link
Copy Markdown
Contributor Author

Small contribution note for maintainers:

  • This is intended as a minor bugfix/accessibility cleanup, not a new feature or major behavior change.
  • I checked open issues before submitting and did not find an existing issue covering generated internal form fields missing ids/autocomplete attributes.
  • No dist/build artifacts are included.
  • Local checks run:
    • npm test -- --runTestsByPath test/unit/core/section/constructor.spec.js
    • npm run lint:type
    • npx eslint src/core/section/constructor.js

@PascalThuet PascalThuet changed the title Fix generated form field attributes fix: annotate generated form fields May 2, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.79%. Comparing base (6a4e749) to head (4e2c6ab).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1640      +/-   ##
==========================================
+ Coverage   81.76%   81.79%   +0.03%     
==========================================
  Files         131      131              
  Lines       21913    21917       +4     
  Branches     6534     6538       +4     
==========================================
+ Hits        17917    17928      +11     
+ Misses       3113     3106       -7     
  Partials      883      883              
Files with missing lines Coverage Δ
src/core/section/constructor.js 91.12% <100.00%> (+1.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JiHong88 JiHong88 merged commit e3a5a87 into JiHong88:master May 2, 2026
1 check passed
@JiHong88 JiHong88 added this to the 3.1.3 milestone May 2, 2026
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.

3 participants