Skip to content

🐛 Fix DOM nesting and accessibility violations (Auto-QA)#3908

Merged
clubanderson merged 2 commits intomainfrom
copilot/fix-dom-nesting-violations-again
Mar 31, 2026
Merged

🐛 Fix DOM nesting and accessibility violations (Auto-QA)#3908
clubanderson merged 2 commits intomainfrom
copilot/fix-dom-nesting-violations-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

Auto-QA detected several HTML content-model violations and missing accessibility attributes across the UI. These cause React DOM nesting warnings and screen-reader/keyboard-navigation issues.


📝 Summary of Changes

Fixes block elements inside <button> phrasing-content model, removes unannotated clickable <div>s, and marks backdrop overlays as aria-hidden.


Changes Made

  • AlertRuleEditor.tsx — Replace <p> and <div> block elements inside <button> (condition-type selectors and AI-diagnosis toggle) with <span className="block …"> to satisfy the HTML phrasing-content model
  • Deploy.tsx — Same <div><span className="block"> fix inside group-picker buttons; add aria-hidden="true" to modal backdrop; add role="presentation" to stop-propagation modal container
  • ClusterGrid.tsx — Remove onClick={e => e.stopPropagation()} from non-interactive wrapper <div> (child buttons already call e.stopPropagation() in handleAction); add role="presentation"
  • ClusterAssignmentPanel.tsx — Add aria-hidden="true" to click-outside backdrop overlay
  • PayloadCard.tsx — Add aria-hidden="true" to click-outside backdrop overlay

Pattern fixed in AlertRuleEditor and Deploy:

// Before — <p>/<div> violates button's phrasing-content model
<button onClick={}>
  <div className="flex items-center gap-2">
    <Bot />
    <div>
      <span>AI Diagnosis</span>
      <p className="text-xs …">Auto-diagnose with AI</p>  {/* ❌ block in button */}
    </div>
  </div>
</button>

// After — all inline via <span>
<button onClick={}>
  <span className="flex items-center gap-2">
    <Bot />
    <span>
      <span className="block text-sm font-medium …">AI Diagnosis</span>
      <span className="block text-xs …">Auto-diagnose with AI</span>
    </span>
  </span>
</button>

Many other violations flagged by Auto-QA were static-analysis false positives (string-only <p> content, SVG elements misidentified as <li>, JS template-string HTML in FlightPlanBlueprint.tsx). No code changes needed for those.


Checklist

  • I used a coding agent (Claude Code, Copilot, Gemini, or Codex) to generate/review this code
  • I have reviewed the project's contribution guidelines
  • New cards target console-marketplace, not this repo
  • isDemoData is wired correctly (cards show Demo badge when using demo data)
  • I have written unit tests for the changes (if applicable)
  • I have tested the changes locally and ensured they work as expected
  • All commits are signed with DCO (git commit -s)

Screenshots or Logs (if applicable)

N/A — structural/accessibility fixes with no visual change.


👀 Reviewer Notes

The false-positive violations (Tour, Onboarding, CardHistory, PageErrorBoundary, BlueprintDefs, FlightPlanBlueprint, etc.) were confirmed to have correct DOM structure; only the five files listed above contained genuine violations.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@kubestellar-prow kubestellar-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 30, 2026
Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 74b14a2
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69cbf19091aa790008a28953
😎 Deploy Preview https://deploy-preview-3908.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @Copilot — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 30, 2026
@kubestellar-prow kubestellar-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

❌ PR Title Verification Failed

Your PR title does not follow the required format.

Current title: Fix DOM nesting and accessibility violations (Auto-QA)

Required Format

PR titles must start with one of these emoji prefixes:

Emoji Meaning
⚠️ Breaking change
Non-breaking feature
🐛 Patch fix / Bug fix
📖 Documentation
🚀 Release
🌱 Infra/Tests/Other

How to Fix

Edit your PR title to start with the appropriate emoji. For example:

  • ✨ Add new feature for user authentication
  • 🐛 Fix crash when loading empty config
  • 📖 Update installation guide

You can edit the title by clicking the Edit button next to your PR title.


This comment was automatically posted by the PR Title Verifier workflow.

@clubanderson clubanderson changed the title [WIP] Fix DOM nesting and structure violations in UI 🐛 Fix DOM nesting and structure violations in UI Mar 30, 2026
@clubanderson clubanderson removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
@clubanderson clubanderson marked this pull request as ready for review March 30, 2026 08:14
Copilot AI review requested due to automatic review settings March 30, 2026 08:14
@kubestellar-prow kubestellar-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@clubanderson clubanderson removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 30, 2026
@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Mar 30, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from clubanderson. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 30, 2026
@github-actions github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 30, 2026
Copilot AI changed the title 🐛 Fix DOM nesting and structure violations in UI Fix DOM nesting and accessibility violations (Auto-QA) Mar 30, 2026
Copilot AI requested a review from clubanderson March 30, 2026 08:29
@clubanderson clubanderson changed the title Fix DOM nesting and accessibility violations (Auto-QA) 🐛 Fix DOM nesting and accessibility violations (Auto-QA) Mar 31, 2026
@clubanderson clubanderson force-pushed the copilot/fix-dom-nesting-violations-again branch from ba2b833 to 0b257d8 Compare March 31, 2026 15:45
@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 31, 2026
@clubanderson clubanderson force-pushed the copilot/fix-dom-nesting-violations-again branch from 0b257d8 to 5dc5da0 Compare March 31, 2026 15:46
@kubestellar-prow kubestellar-prow bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 31, 2026
- Replace block elements (<p>, <div>) inside <button> with <span> elements
  in AlertRuleEditor.tsx and Deploy.tsx to satisfy HTML phrasing-content model
- Remove redundant onClick={e => e.stopPropagation()} from ClusterGrid.tsx
  wrapper div (child buttons already handle stopPropagation)
- Keep role="presentation" on non-interactive wrapper divs
- Keep role="dialog", aria-modal, and aria-labelledby on modal dialogs

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…yloadCard

Complete the accessibility fixes described in the PR: add aria-hidden="true"
to click-outside backdrop overlays in ClusterAssignmentPanel.tsx and
PayloadCard.tsx to prevent screen readers from announcing non-interactive
overlay elements.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson clubanderson force-pushed the copilot/fix-dom-nesting-violations-again branch from 9c0dddb to 74b14a2 Compare March 31, 2026 16:08
@kubestellar-prow kubestellar-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 31, 2026
@clubanderson clubanderson merged commit cce86e5 into main Mar 31, 2026
18 of 20 checks passed
@kubestellar-prow kubestellar-prow bot deleted the copilot/fix-dom-nesting-violations-again branch March 31, 2026 16:14
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auto-QA] DOM nesting and structure violations found

3 participants