Skip to content

fix(a11y): keep visually hidden input labels accessible - #2564

Merged
amir-ba merged 2 commits into
telekom:mainfrom
UmutAlisoglu:codex/accessible-hidden-input-labels
Oct 29, 2026
Merged

amir-ba merged 2 commits into
telekom:mainfrom
UmutAlisoglu:codex/accessible-hidden-input-labels

Conversation

@UmutAlisoglu

Copy link
Copy Markdown
Contributor

Fixes #2558. Claimed before implementation in the issue.

hide-label-visually currently applies visibility: hidden to the textarea and date-picker labels. Chromium exposes an empty accessible name for both controls. Replace that rule with the screen-reader-only clipping pattern already used by Scale's checkbox, keeping the label available to assistive technology while removing it visually.

Browser regressions check actual Chromium accessibility names, the clipped label bounds, focus/typing, and switching the label back to visible. No ARIA name overrides or public API changes. The new test has the MPL header; the contributor entry is in the existing AUTHORS list.

Validation on Windows / Node 24.21.0 / frozen Yarn 1.22.22 dependencies:

  • Targeted browser tests before fix: 2 failed, 3 passed, with empty names instead of Description / Start date.
  • After fix: 5 targeted tests pass. The affected suites also pass in full runs on Chromium 134 and Chromium 153.
  • Full spec suite: 360 tests and 168 snapshots pass across 62 suites. An existing Jest worker-teardown warning remains.
  • Full E2E on Chromium 153: 79 passed, 1 failed. The failing dropdown-select disabled-option typing test also failed in the pre-fix broad run; these two components' suites pass. The overall E2E suite is therefore not claimed green locally.
  • Component-wide TSLint, Prettier on changed source/tests, and diff checks pass. The E2E build completes; existing Stencil/Duet bundling and deprecation warnings remain.

@maomaoZH (CODEOWNERS), ready for review. Signed-off commit; AI assistance was used for implementation and regression tests.

Signed-off-by: Umut Alisoglu <umutalisoglu@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 05:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow CSS fixes and focused regression tests address the accessibility issue with no blocking issues identified.

No open issues 🎉

What changed in this PR

Fixes #2558 by keeping visually hidden textarea and date-picker labels available to assistive technology, without changing public APIs.

Changes:

  • Replaces visibility: hidden with screen-reader-only clipping in both components.
  • Adds browser regressions for accessible names, hidden-label dimensions, focus, and restoring visible labels, plus textarea typing.
  • Adds the contributor to AUTHORS.
File Description
packages/​components/​src/​components/​textarea/​textarea.e2e.ts Tests accessible names and label visibility transitions.
packages/​components/​src/​components/​textarea/​textarea.css Keeps visually hidden textarea labels accessible.
packages/​components/​src/​components/​date-picker/​date-picker.e2e.ts Adds accessible-name and label visibility regressions.
packages/​components/​src/​components/​date-picker/​date-picker.css Keeps visually hidden date-picker labels accessible.
AUTHORS Adds contributor attribution.

Review effort: Balanced

@amir-ba

amir-ba commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

LGTM @UmutAlisoglu , remove the authors change , since it belongs to a partner company of ours and we will merge this .

Comment thread AUTHORS

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a maintained file and belongs to the original 3rd party maintainers of the repo . Please do not change.

Signed-off-by: Umut Alisoglu <umutalisoglu@gmail.com>
@UmutAlisoglu

Copy link
Copy Markdown
Contributor Author

Removed the AUTHORS change as requested. The accessibility fix and its browser regressions are unchanged. Thanks for the review!

@amir-ba
amir-ba merged commit e90165a into telekom:main Oct 29, 2026
10 checks passed
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.

scale-textarea and scale-date-picker: hide-label-visually removes the accessible name

3 participants