Skip to content

Bugfix/oo 50779 nui checkbox incorrect markup fix main#882

Draft
harsha573252 wants to merge 4 commits into
solarwinds:mainfrom
harsha573252:bugfix/oo-50779-nui-checkbox-incorrect-markup-fix_main
Draft

Bugfix/oo 50779 nui checkbox incorrect markup fix main#882
harsha573252 wants to merge 4 commits into
solarwinds:mainfrom
harsha573252:bugfix/oo-50779-nui-checkbox-incorrect-markup-fix_main

Conversation

@harsha573252

Copy link
Copy Markdown
Contributor

Frontend Pull Request Description:

A11y fix for nui-checkbox:
Move the aria-checked attribute off the label and onto the native checkbox input to improve ARIA semantics (removed role="checkbox" and aria-checked from the label; added [attr.aria-checked] on the input). Update E2E accessibility specs by removing "aria-allowed-role" from the disabled rules arrays.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have updated change log
  • I have been following Definition of done
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new lint warnings
  • New and existing unit tests pass locally and on CI with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Additional Context (if necessary)

…d updated a11y rules

Move the aria-checked attribute off the label and onto the native checkbox input to improve ARIA semantics (removed role="checkbox" and aria-checked from the label; added [attr.aria-checked] on the input). Update E2E accessibility specs by removing "aria-allowed-role" from the disabled rules arrays.
Replace attempts to toggle disabled checkboxes in e2e tests with assertions that the elements are disabled (packages/bits/e2e/components/checkbox-group/checkbox-group.e2e.spec.ts and packages/bits/e2e/components/checkbox/checkbox.e2e.spec.ts). Add a unit test in packages/bits/src/lib/checkbox/checkbox.component.spec.ts to ensure clicking a disabled checkbox does not change its checked state or emit valueChange. This prevents performing actions on disabled elements and verifies the component's disabled behavior.
Replace attempts to click disabled checkboxes with explicit assertions that the checkbox elements are disabled. This avoids interacting with controls that should be inactive and more accurately verifies that selection state remains unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant