Skip to content

fix(NcCheckboxRadioSwitch): only set aria-labelledby when the label is rendered - #9292

Open
bycorekci wants to merge 1 commit into
nextcloud-libraries:mainfrom
bycorekci:fix/aria-labelledby-9242
Open

bycorekci wants to merge 1 commit into
nextcloud-libraries:mainfrom
bycorekci:fix/aria-labelledby-9242

Conversation

@bycorekci

Copy link
Copy Markdown

☑️ Resolves

🚧 Tasks

  • Only set aria-labelledby on the input when the default slot is used, i.e. when the label element it points to is actually rendered.
  • Unit tests added to checkbox.spec.ts; the no-slot case fails without the change.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…s rendered

The label element is only rendered when the default slot has content, so without it aria-labelledby pointed at an id that does not exist.

Assisted-by: DeepSeek:V4.1-Flash

Assisted-by: Claude-Code:claude-sonnet-5-5
Signed-off-by: Bycorekci <18033711+Bycorekci@users.noreply.github.com>
@bycorekci
bycorekci requested a review from a team as a code owner December 3, 2026 10:51
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.61%. Comparing base (09553f5) to head (0529b79).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9292      +/-   ##
==========================================
- Coverage   62.63%   62.61%   -0.03%     
==========================================
  Files         131      131              
  Lines        4791     4791              
  Branches     1449     1449              
==========================================
- Hits         3001     3000       -1     
- Misses       1527     1528       +1     
  Partials      263      263              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

This branch has not been deployed

No deployments
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.

NcCheckboxRadioSwitch: aria-labelledby references a label that is not rendered without default slot

1 participant